Node.js Chatbot affects network even days after usage

Hello Twitch World!

I’ve written a chatbot using node.js and tmi.js. Everything runs smoothly, but using the bot causes my internet connection to slow down and become unstable for days to come. At first I thought it a coincidence but the same phenomenon happened after each usage of the bot. The bot is not running, I restarted my pc and router repeatedly but still my normally strong internet connection becomes fragile.

I’ve monitored the amount of data upload and download during the run of the bot. It’s a bit higher than usual of course but nothing drastic.

Has anyone encountered a similar problem before? I’m at my wits end, none of the tutorials mention that phenomenon. I’d appreciate any thoughts on the matter!

Here is a minimal version of my code, it’s exactly as seen in the countless tutorials on the internet:

const tmi = require('tmi.js');

const client = new tmi.Client(
debug: true
secure: true,
reconnect: true
username: ‘’, //deleted for privacy reasons
password: ‘’ //deleted for privacy reasons
channels: [ ‘’ ] //deleted for privacy reasons


function fun1() {

‘message’, (channel, tags, message, self) =>

    if(message.toLowerCase() === '!bot') 
        client.say(channel, `bot is online`);




A connection to Twitch Chat will have a negligible impact on your network, and wont do anything to slow it down or make it unstable.

A chat connection is very simple, low bandwidth, and creating a connection from a bot you wrote is no different than going to and using chat there, so even if there was a network issue you would be experiencing it each and every time you visit a Twitch page that has chat.

I would suggest you contact your ISP if you are having internet connection issues.

Thank you for your reply. I agree wholeheartedly with you: Running the bot should be no worse than chatting normally on Twitch. But at this point it can’t be a coincidence. I have a really strong network connection, I never encounter any problems. But every time after running the bot the connection immediately becomes unstable for 3-5 days.

The chatbot doesn’t have an explicit disconnect command. But closing cmd and even restarted the pc should be enough in my eyes.

I don’t know what might be the problem.

When the NodeJS app is closed, the connection will be terminated. After that point it will have no impact on your system or your network.

Chat on the Twitch site itself doesn’t use tmi.js, as that’s a 3rd party module, but under the hood it’s doing exactly the same thing and establishing the same sort of connection to the same places. In fact if anything chat on the Twitch site is doing even more as it also establishes connections to others services to enhance chat, where your app is just a single connection to chat.

I really appreciate the input! The fact remains though that execution of the bot has a lasting effect on the network.

Has anyone witnessed a similar phenomenon or has further inside into the topic?

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