Bot getting me locked out of chat

So I’m working on creating a bot for my friend, but for whatever reason it seems to be locking me out of Twitch Chat. Sometimes after running it, whenever I try to send a message in twitch chat, I get the message saying “Sorry, we were unable to connect to chat. Reconnecting in 2 seconds.” I know the bot isn’t sending so many chat messages to be get the global lockout from chat because of spam, but it’s getting me locked out somehow. Any ideas as to what might be happening and/or how to fix it?

You should do some debugging and see what’s happening right before it occurs. What sort of bot? are you sending PONG for PING?

So, I’m basically trying to make something similar to RevloBot with points that people can redeem to do stuff and make things happen on stream, but have it more personalized. And yes I am sending PONG for PING.
As for debugging, it’s hard to tell exactly when I’m getting locked out, because there seems to be no indication that I’ve gotten locked out.

The indication of lockout is the disconnecting from chat.

If you are sending /mods a lot that can cause it.
Or joining a PILE of channels at once/too quick.

You might want to look at using a framework like pIRC or tmi.js to help you

Nevermind, I figured out the problem. An event was firing way more often than it was supposed to, causing the bot to try to send a crapload of messages. Thanks for your help.

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