Twitch IRC bot scalability

If you use the undocumented Chatters endpoint tmi.twitch.tv/group/user/CHANNEL_NAME/chatters it’ll give you a list of users in chat on that channel. So what you could do if you’re using a user account to connect with, rather than justinfan,

Keep in mind though that the API is cached, so once you join a channel it could be several minutes before it is updated, this means if you’ll still have trouble if your multiple services are all trying to join get the userlists and join channels at the same time.

There are also many server-side options that could work that could avoid the need to check the channel for the presence of another of your services, such as sharing their list of connected channels between eachother, or getting the list of channels and splitting them between the services before they start connecting. A server-side option would be more ideal as it means not having to make any API requests, and the services could be designed with overlapping not being an issue in the first place.