How to setup Multiple IRC Bot Instances

Hey guys. I need help understanding what i need to setup my bot. Thanks in advance for reading this.

I am crafting an web app where like in streamlabs o streamelements you can activate a bot to listen to your channel’s chat and interect with commands and stuff.

I’ve never used node.js for production and the question is: What do i need to make my bot recognize you’ve activated it and include your channel to the “must listen to” channels list?

Will i run just one script that will keep reloading the channels list?

Or will i detect the incoming need to listen a new channel and then start some kind of another process for the same piece of code?

Sorry for my english and newbish question… Was not having much success on google.

Thanks again!

Usually you would use the Twitch OAuth flow on your website, and then when a user logs in display them the option to have your bot join their channel. When that is clicked your app could add that channel to a list in a database, and then use the join command on your chat connection to join that channel.

If your bot starts growing to hundreds/thousands of channels then you’ll likely want to add an additional check to see how many channels the bot is currently in, and if it’s above a certain number rather than join the new channel on that connection, you can start up a new connection to spread the load.

Whether you want to have 1 NodeJS process that’s handling multiple connections to chat, or multiple processes that each handle one connection, is entirely up to you and the design needs of your app. (A single process approach may be easiest to understand when starting out, and you may not need multiple processes, or even multiple connections, until your bot sees a lot of channels wanting to use it).

Thanks a lot for your reply. Turned out to be in sync with what i imagined.

I am marking this as a solution and hopefully will seee you around!

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