Discord bot is running two instances, and I can't find one of them to turn it off

2.8k Views Asked by At

I made a simple Discord response bot that's hosted on glitch.com. My problem is that whenever I make a change (such as to add a new response) and run the app via the console, the instance of the bot that was already running doesn't turn off. This makes the bot post responses that were already in the previous version twice.

How can I find the instance of the bot that's already running and turn it off? It doesn't show up in glitch's logs. Thanks in advance!

1

There are 1 best solutions below

0
On

This is not a thing related with Discord.js

You can try shutting it down with eval command if you have one.

Also the bot won’t turn off if you run another instance, This is similar to how user accounts works. You can have your account running at the same time at both your phone and pc or two different browser tabs at the same time..

User accounts also has tokens.

And if Glitch has automated-deploys feature, you don't need to run another instance everytime.

You can simply regenerate your bot's token to make it sign off.