Discord bot scripts running "twice" ("2 bots at once")

Sometimes, when I use my bot, it replies twice. Usually, I just change the bot token after that, but that’s not a real solution.
In the first place, I wanna know why is this happening. It’s really annoying + I don’t know what is even causing it.
the project with that bot is the only one with its token and somehow, there are two “scripts” running at once.
Is there a way to fix that?

Thank you.

Could you share your code?

Also, is your project public or has your token been leaked? Are you accidentally putting it on GitHub?

There’s too much code.
My token wasn’t leaked and the bot isn’t on github …
(I’ve changed the token multiple times and it still happens sometimes) …
Edit: if the token was leaked, the same commands couln’t be used (like, there are 2 same scripts runnin g apparently)

This happened to me yesterday after a restart too. Randomly disappeared after awhile

How did you fix it? Regenerating another token?

Restarted the bot. Nothing more than that

Thing is that glitch is screwed at this moment. Having to restart about every hour installing all the packages in the hope it won’t stop next hour doesn’t make nyone happy. The uptime is less then 5% atm

1 Like

Ya’ll need to stop hating on Glitch. They’re doing their best to stabilize the platform.


What’s the source of this?

all those errors come down to glitch effing up for the past weeks

Hey what’s up

Just regenerate the token from developer portal of discord
and put the new token of the bot in your project. it solved my issue yesterday

1 Like

Hating and frustrating are different things. I completely understand their trying to resolve the issue. Which I totally respect. Though you gotto understand having a bot supporting the mass globally asks for uptime. That frustrates when the system gets daily new problems.

From slow loading projects to reinstalling dependacies to blocking ping etc etc. Seems like I have to spend daily more time to make sure the uptime is enough to support the users

1 Like

Mathematical genius. Downtime per minute / total time a day multiplied by 100 = downtime.

1 Like

I had a similar problem the other day. At first, the bot made two identical answers. Yesterday I was informed that the bot makes four identical answers. I changed the bot token and the problem was solved

I second this. I’ve been unable to edit my bot on Glitch, at all in the past few days. I moved to Repl.it

Hey man, from the title (“2 bots at once”). I’d assume you have two bots with the same code. Could you send your project link so we can view it?

Sorry, I can’t send the project cause it contains stuff like API keys, etc
But it’s one project, just “2 bots” running at once. This was happening multiple times. I always regenerated the token, and it still happens sometimes …

As long as your bot token is in the env As long as any of your important information is in the .env file, those who can’t edit on the project itself, will not be able to see the .env file.

I’d assume the problem lies with this “2 bots running at once” but I don’t actually understand what you mean by that…

Are you hosting a Discord bot? And a website?

Basically, if I use a command, I would get 2 same responses.