Chat bot not posting unless its a moderator

Hello, I recently launched a game that uses a Twitch chat bot as part of its Twitch Integration.

It was working fine in testing, but no longer appears to be posting messages. It only posts at roughly once a minute to each channel it joins.

Any help would be most appreciated.

Thanks!

Sounds like you are exceeding a rate limit.

Or you don’t meet the requirements to post in all channels. Most channels employ a follower mode, requiring the bot to follow the channel (which is can’t automatically as there is no create follows endpoint).

Or for the bot to hold a rank, such as VIP or Moderator in the channel.

A normal user cannot repeat the exact same message within a given time span.

Low all response messages from the server.

If you do not have the CAPS and TAGS capabilities enabled you might be lacking critical response messaegs and information to help diagnose the issue.

I do follow the channel on connection, so that should not be the problem. It is not even working with my own account anymore. I have also tried sending different messages to make sure that its not because it is repeating the same message.

Is there a way to tell if the account has violated something globally and gotten blacklisted?

Given theres no API for that, that doesn’t seem likely unless you are logged into the account and doing it manually. That API endpoint was removed and no longer available.

This suggests you might have been globalled from exceeding the rate limits.

Globals usually prevent you connected to chat at all and last time I checked last around 30 minutes.

There is no blacklisting that I’m aware of that operates how you descirbe

And if there was an issue then the ClientID would be blocked from using any API at all.

Gotcha on the follow. At one point I was calling https://api.twitch.tv/helix/users/follows successfully but that may have been a while ago.

I am able to connect to the chat and read the messages as they come in, however writing messages is not working.

Is there documentation handy for what would cause being globalled? The chat bot does not post very frequently. However, it does post from just a small series of messages, so across all channels the messages are not very unique. Would that cause an issue?

That got removed. As of July last year

Exceeding the rate limits will cause this.

Honestly don’t know.

Make sure to enable Tags and commands capabilities

Then monitor for USERNOTICE and NOTICE messages which might help track down issues

Thanks for all the info. I do have tags and commands enabled, I will look for the USERNOTICE/NOTICE messages but haven’t yet noticed any of them thus far.

On the chatbot limits, is this saying that I can only send 20 messages per 30 seconds to ALL channels?

“If 10 users are running the bot on a single bot account, the rate limit applies across all 10 users (meaning that the 10 users combined can send a total of 20 messages). If each user is using a different bot account, each bot account has its own rate limit (meaning that each user can send 20 messages).”

So it looks like when the bot is a moderator I do get back the
CAP * ACK :twitch.tv/tags
CAP * ACK :twitch.tv/commands

as well as a USERSTATE after sending the PRIVMSG

But when it is not a moderator, those do not seem to be in the logs and nothing is read after PRIVMSG is written

You should get a USERSTATE on room join.

Here is what I am seeing when the bot is a mod vs not

When Not Mod:

WRITE: PASS oauth:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
WRITE: NICK RiffTraxTheGameBot
WRITE: USER RiffTraxTheGameBot 8 * :RiffTraxTheGameBot
WRITE: JOIN #markzorn
WRITE: CAP REQ :twitch.tv/tags
WRITE: CAP REQ :twitch.tv/commands
WRITE: CAP REQ :twitch.tv/membership
READ: :tmi.twitch.tv 001 rifftraxthegamebot :Welcome, GLHF!
READ: :tmi.twitch.tv 002 rifftraxthegamebot :Your host is tmi.twitch.tv
READ: :tmi.twitch.tv 003 rifftraxthegamebot :This server is rather new
READ: :tmi.twitch.tv 004 rifftraxthegamebot :-
READ: :tmi.twitch.tv 375 rifftraxthegamebot :-
READ: :tmi.twitch.tv 372 rifftraxthegamebot :You are in a maze of twisty passages, all alike.
READ: :tmi.twitch.tv 376 rifftraxthegamebot :>
READ: :rifftraxthegamebot!rifftraxthegamebot@rifftraxthegamebot.tmi.twitch.tv JOIN #markzorn
WRITE: PRIVMSG #markzorn :/me Welcome - make it unique b153efe0-9c00-4ac1-827b-7435cbde5000

As Mod:
WRITE: PASS oauth:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
WRITE: NICK RiffTraxTheGameBot
WRITE: USER RiffTraxTheGameBot 8 * :RiffTraxTheGameBot
WRITE: JOIN #markzorn
WRITE: CAP REQ :twitch.tv/tags
WRITE: CAP REQ :twitch.tv/commands
WRITE: CAP REQ :twitch.tv/membership
READ: :tmi.twitch.tv 001 rifftraxthegamebot :Welcome, GLHF!
READ: :tmi.twitch.tv 002 rifftraxthegamebot :Your host is tmi.twitch.tv
READ: :tmi.twitch.tv 003 rifftraxthegamebot :This server is rather new
READ: :tmi.twitch.tv 004 rifftraxthegamebot :-
READ: :tmi.twitch.tv 375 rifftraxthegamebot :-
READ: :tmi.twitch.tv 372 rifftraxthegamebot :You are in a maze of twisty passages, all alike.
READ: :tmi.twitch.tv 376 rifftraxthegamebot :>
READ: :rifftraxthegamebot!rifftraxthegamebot@rifftraxthegamebot.tmi.twitch.tv JOIN #markzorn
WRITE: PRIVMSG #markzorn :/me Welcome - make it unique 1e5bc499-5780-4312-9179-56372af58d69
READ: :rifftraxthegamebot.tmi.twitch.tv 353 rifftraxthegamebot = #markzorn :rifftraxthegamebot
READ: :rifftraxthegamebot.tmi.twitch.tv 366 rifftraxthegamebot #markzorn :End of /NAMES list
READ: :tmi.twitch.tv CAP * ACK :twitch.tv/tags
READ: :tmi.twitch.tv CAP * ACK :twitch.tv/commands
READ: :tmi.twitch.tv CAP * ACK :twitch.tv/membership
READ: @badge-info=;badges=moderator/1;color=;display-name=rifftraxthegamebot;emote-sets=0;mod=1;subscriber=0;user-type=mod :tmi.twitch.tv USERSTATE #markzorn

Summary

This text will be hidden

Generaly speaking CAP’s should be sent before PASS/NICK

And you may want to wati for the ACK’s of the CAP’s before running joins.

i wonder if you are being dropped from ban evasion or something weird along those lines. Which wouldn’t raise something visible but this is clutchy at straws

Ok - I will try that out. This is really the first time I am digging into what is going on here because this is just a library I picked up. I do appreciate all the help and the quick responses here, will give some of that a try.

For what is worth, I tried all of this with another account/token and it worked exactly as expected. So perhaps something is getting rate limited? Although like I said, it does not send messages very frequently, perhaps once per channel.

I will still try your suggestions though. Thanks

Are you rate limiting your joins as well? That could get you globaled as well if you join too fast

I am not, but unless someone is misusing the game a lot, that should only happen at most once every 10 minutes or so.

What is the rate limit for joining? and is that per channel or globally?

The following table shows the rate limits for a normal account.

20 authentication attempts per 10 seconds per user.
20 join attempts per 10 seconds per user.

20 joins per 10 seconds (global)

I have reordered the writes and am still running into the issue with the user. If I use another user however, it does work as expected, so I assume it has been limited/banned for some reason, but as it does not give me any information, I am unable to tell why.

Is there no way for someone internal to Twitch to be able to give me that info so that I can rectify the situation? I am still able to login as that account, so it has not been completely shut down, and it will let me post if I am a mod in the channel.

As before, when joining and attempting to post a channel when not a mod:
WRITE: CAP REQ :twitch.tv/tags
WRITE: CAP REQ :twitch.tv/commands
WRITE: CAP REQ :twitch.tv/membership
WRITE: PASS oauth:XXXXXXXXXXXXXXXXXXXX
WRITE: NICK RiffTraxTheGameBot
WRITE: USER RiffTraxTheGameBot 8 * :RiffTraxTheGameBot
READ: :tmi.twitch.tv CAP * ACK :twitch.tv/tags
READ: :tmi.twitch.tv CAP * ACK :twitch.tv/commands
READ: :tmi.twitch.tv CAP * ACK :twitch.tv/membership
READ: :tmi.twitch.tv 001 rifftraxthegamebot :Welcome, GLHF!
WRITE: JOIN #markzorn
READ: :tmi.twitch.tv 002 rifftraxthegamebot :Your host is tmi.twitch.tv
READ: :tmi.twitch.tv 003 rifftraxthegamebot :This server is rather new
READ: :tmi.twitch.tv 004 rifftraxthegamebot :-
READ: :tmi.twitch.tv 375 rifftraxthegamebot :-
READ: :tmi.twitch.tv 372 rifftraxthegamebot :You are in a maze of twisty passages, all alike.
READ: :tmi.twitch.tv 376 rifftraxthegamebot :>
READ: @badge-info=;badges=;color=;display-name=rifftraxthegamebot;emote-sets=0;user-id=772776071;user-type= :tmi.twitch.tv GLOBALUSERSTATE
READ: :rifftraxthegamebot!rifftraxthegamebot@rifftraxthegamebot.tmi.twitch.tv JOIN #markzorn
READ: :rifftraxthegamebot.tmi.twitch.tv 353 rifftraxthegamebot = #markzorn :rifftraxthegamebot
WRITE: PRIVMSG #markzorn :/me Welcome - make it unique 4384681e-6206-4cb0-9b44-68026199d528

Thanks again for any help you can provide.

And you may want to wati for the ACK’s of the CAP’s before running joins

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.