I’m creating a bot that will soon be used on a channel and will have to spit out a fair amount of messages. I already have a system set up, but I was wondering how bots like Nightbot, Moobot, and Mikuia are able to chat so many messages on so many different channels without getting banned. It seems like even if they were modded on every channel and the limit was 100 msgs every 30 seconds they would still get IP banned.
If you are developing a bot to be used on ONE channel only, there is no reason to circumvent the Message limitations.
If the bot for ONE channel is going to get near the limit, then it’s a misuse of chat (in my opinion).
The large multi channel bots, create more than one instance of the bot running from more than One IP Address I believe.
But never do they have two IP address’ed bots talking to the same channel.
If your user/bot account is hammering one channel hard enough to hit the limit, then you are doing something wrong and your design is wrong. If you are building something like a game where the game outputs responses to chat, then Twitch is likely no the right platform, for example.
On a normal one channel, if your bot is going to spit out THAT many messages then the messages are going to be lost in the wall of “spam” that would be created.
Alright, the bot is supposed to be used on different channels (like Nightbot and Moobot). I was asking because I needed to know how to make sure that the bot didn’t get itself banned by giving lots of users feedback on different channels.
So if you log into the same account on different IPs, then the bot won’t get globalled if it has to send a fair amount of messages?
Use a global message counter to prevent hitting the limits.
Mikuia runs from one IP address.
How are you guys able to keep it sending messages as fast as it does without it having to run on different IPs?
you don’t need separate IPs, only separate connections
It’s just like @Hatsuney said:
You can have 30 different instances of your bot from the same IP.
Twitch only uses your IP when they ban you for surpassing their limits, but their limits are per connection and not by IP
heh I always thought it was per IP, must of go that wire crossed at somepoint…
is that a specific number or are you just giving an example
It’s only an example, i think you can have as many as you want
It’s not documented anywhere, it has never been but i assume that’s how it works.
The docs are better now but there’s still some info missing about the chat limits. They have always been a little bit confusing, especially for new devs.
This post Problem with own java lib seems to contract dict what people are saying in this thread.
Message rate limit is per TCP connection, not IP address, however the resulting block is by IP. JOIN/authentication limiting is per IP.
If your bot is going over the 100 in 30 limit even after implementing a proper queuing system you should reach out to support to discuss white-listing which will grant an even higher limit for messages. Using multiple connections to bypass limits could be interpreted as a violation of the developer agreement.
Alright, thanks for the information. Just trying to figure out how to let the bot run smoothly without the streamers getting IP banned.
If your bot is posting more than 20 messages in 30 seconds on a single channel, it’s either posting too much or there’s a better way to provide the service… The 100 mod status allows should be plenty.
The reason I’m asking these questions now even though the bot is small is because I want this bot or future bots I make to be scalable, just in case there’s a huge streamer that suddenly uses it.
Hey @DallasNChains, can we get some insight on this subject?
I’ve been reading the Developer Agreement again (more precisely the “IV - C - Rate Limits” topic) and I couldn’t determine if using multiple TCP connections is a possible violation of this agreement.
I don’t think there’s another way to let our bots distribute the load across thousands of channels besides using multiple TCP connections.
I don’t know if white-listing is a thing on Twitch (besides whispers) since it isn’t documented anywhere, but if it is, how can we apply and what are the new limits to make sure our services keep running?
Most developers get “scared” on how to handle Twitch’s chat limits (probably because of the mod status that they need to keep an eye to make sure they don’t surpass the limits if they get unmoded in the middle of a stream)
I think a whitelist would be a pretty good idea for this kind of thing.
The whitelist for Whispers and IRC are the same. That’s existed since Nov of 2015-ish? Well before my time. You can apply for it via Support. Not everyone gets whitelisted though. We evaluate each bot on a case-by-case basis. It’s also just an elevated limit for messages, so you’d still have guard rails to work inside of.
Re: rate limits. In general, we approach rate limits from an abuse perspective. E.g. Hitting the REST API with 1,000 req/second or sending thousands of messages/second to IRC. You’ll get a polite-but-firm email from me in those situations.