Ohhhhh okay that makes sense. So essentially just create multiple clients based on how many keys I have and the register the same handler functions to all clients like this?
// create bot clients
const client_1 = new tmi.client(config);
const client_2 = new tmi.client(config);
// register event handlers
client_1.on(“message”, onMessageHandler);
client_2.on(“message”, onMessageHandler);
For the processes themselves I’m a bit confused when it comes to how to do this in Node/JS in general (usually use Python for process/threaded work). I’ve done some digging and it seems like the two main options are worker threads and child processes but not sure what would be best for this problem. My first guess would be create a process for each client and that would work but was wondering if making commands run off a worker thread from the child process be worth it or even possible? Or if just running each client off a worker thread would be sufficient.
I know that most options that I gave there would work just not sure if spawning worker threads from child processes is actually a thing. I’m essentially looking for the most efficient way of solving the problem whether that’s using child processes, worker threads or a combination of both. Thanks!