justintv / Twitch-API

A home for details about our API
www.twitch.tv
1.72k stars 379 forks source link

Getting locked out while developing my bot #660

Closed ErraticFox closed 7 years ago

ErraticFox commented 7 years ago

Could nodemon be the cause of this? As I seem to already be locked out whilst only sending about 15 messages in the span of roughly 35 minutes. Though while developing my bot, I use nodemon which restarts my bot upon every save I do. This mean my bot has to reconnect to the API Server, so could this be causing me to be timed out if I save about every two - five minutes?

I keep getting the error Sorry, we were unable to connect to chat. Reconnecting in 2 seconds. I got this early last night, I didn't think much and play a video game. Though, not even an hour into working on my bot and it appears I'm locked out again.

BarryCarlyon commented 7 years ago

Sounds like your bot is sending more messages than you think it is and you are hitting the message send limit.

You should install a message limited to prevent your bot sending too much.

You might be hitting a limit related to joins, which seems unlikely, but you probably shouldn't use nodemon to restart the bot EVERY save. Especially if you save as much as I do when writing stuff…

Restart when you have enough to test, not one line changes.