I have some problems right now that my bot and other users are randomly leaving and joining channels without me actually doing something.
The bot also isn’t always in the http://tmi.twitch.tv/group/user/channel/chatters list.
I’ve noticed this recently as well. It has always been the case that people would randomly be shown as leaving/joining even though they were probably there all the time, but now most of the channel randomly just PARTs and JOINs. I’ve noticed that in the userlist in Chatty and in mIRC.
Apparently the API http://tmi.twitch.tv/group/user/<channel>/chatters is affected as well. As I reloaded it every few seconds it changed between around 500 and 0 and some numbers in between (on a channel with 600 viewers, so 500-ish would probably be correct).
I have too noticed this. It has been an issue with the bot as of recent. Many of them are seeing this issue which in turn causes issues with the commands setup for them (they look for op and they do not have it)
Is a way to promote this issue to make more aware at the Twitch Staff level so that we can get some type of response on it? It affects my channels point system and moderator commands pretty often as I’m sure it does with most you.
I’ve worked around this for now by checking the response from http://tmi.twitch.tv/group/user/{channel}/chatters. If the broadcaster is not listed as a mod, then try again. It isn’t perfect, but my bot doesn’t randomly stop working anymore because it thinks it isn’t mod.
I highly recommend you use IRCv3 tags to determine if a user is a mod or not. Unlike the API endpoint or the status codes, IRCv3 tags will always be up to date on whether the user is a mod or not. You can find out more about them at https://github.com/justintv/Twitch-API/blob/master/IRC.md#twitch-capabilities
That would be lovely, except that we are receiving +o and -o notices too. The situation is that with the rate limits, some of us will only allow our bots to chat if they are a mod. And we are very careful about that too. We cannot ignore a -o notice because it might be legitimate. We won’t send a message (in case we are above the normal rate limit) and we won’t receive a USERSTATE notice with the up to date information.
MODE messages have always been delayed though, so you might be no longer mod for quite a while until you noticed. There is just no way to reliably determine if you are mod before sending a message.
If Twitch can confirm that there is a grace period with the rate limits after your bot is unmodded, then the USERSTATE notice will indeed be the best way to pick up an unmodding. Your point is well made, though - we could potentially find out about an unmodding too late.
As stated above… We are using the API and such BUT with the IRC in mind it is cutting out and in and with that it is annoying and only just recently started happening. Please address this or hand to someone that will as we don’t need to learn about the API as most of us are already using it (or should be). Sorry to be blunt but it is not coming across that you completely understand what is going on with the information.
We cant use the API if that is even wrong which is what is happening. My bot alone in about 4 hours time has “Left” and “rejoined” about 10 times and then also on top of that once in it gets op and then losses op … so at this point would you please just look at the server and the IRC watch it see what happens…
Even the chats on the stream or not showing the proper information so that does not even mean it is our bots in general it means somthing is wrong with the system and not how we are using it if the chat is not even showing the proper people in the chats and whom is op and whom is not.
I fully understand the issue that you are bringing up. By the design of the IRC servers we’ve never guaranteed that +o, -o, JOIN, nor PART arrive in real-time. Since the chatters API endpoint is based off of the same (potentially stale) data, it too can have issues. Hence, I am proposing bot authors use IRCv3 to validate if a user issuing a command is a mod for sake of authentication.
As @trumpi27 brought up, this doesn’t help in the case of trying to find out if the bot itself is modded. The only two solutions I’d know for this case is to either always assume you aren’t modded, or to have two connections open and read your own messages to see if the server considered you a mod or not. I understand these solutions aren’t great, but they’re the only foolproof methods of dealing with “Am I a mod?”.
Finally, in regards to the “why did this suddenly get worse?”, our chat team is aware of the issue and is working on it. I’m afraid I don’t have more information for you at this time.
Are there a reliable way to detect if someone is in the chat?
As mentioned earlier, the api seems to randomly leave people out, instead I tried to change it to log on to the chat instead and get the names list, but that too seems to be leaving people out.
:mikeydk.tmi.twitch.tv 353 mikeydk = #mikeydk :mikeydk
:mikeydk.tmi.twitch.tv 366 mikeydk #mikeydk :End of /NAMES list
then after some seconds,
nightbot joined #mikeydk.
:nightbot!nightbot@nightbot.tmi.twitch.tv JOIN #mikeydk
but nightbot had been there all the time.
When making it log in again and check, it returns what I expected it would have both times
:mikeydk.tmi.twitch.tv 353 mikeydk = #mikeydk :mikeydk nightbot
:mikeydk.tmi.twitch.tv 366 mikeydk #mikeydk :End of /NAMES list
It actually seems to be linked directly to the api also reporting wrong, not sure if it helps finding the problem.
I use the endpoint that I quoted above to determine who is in chat, but I ignore responses that don’t list the broadcaster as a moderator. It is not perfect, but with the ignored responses I do get a high accuracy.