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

Discord py hosting on glitch

So… you mean “2 messages at once”

Two same messages at once.

Yeah, me and a friend have had the same issue a couple of times the last 2 weeks or so.

So like, if I did &say test. The same bot will reply with test 2 times.

Maybe you are running the same code on your computer or on a different project.

No, it just happens randomly and I fix it by regenerating the token …

It should fix by regenerating the token.

Hmmm… Are you sure? It would make sense if the code was running on two computers, projects, etc. as regenerating the token would make the old code not work. Maybe you have it on some other hosting as well and don’t realise? Do you have it automatically update to a different hosting provider?

Maybe the same code running on a different computer/project and that’s why it is running twice, or something in the code is broke it.

1 Like

No, the same code is not running on a different computer. It is a problem with glitch. It’s probably related to the issues they’ve had lately.

The times I’ve had that issue is after the project has reloaded because of some code change, or a refresh, but I guess it actually started a new one and didn’t stop the old one.

I’m sure. Like, even if I don’t touch the project for a few weeks, it breaks on it’s own.

But this isn’t the first time, though.

Yes, but that isn’t really a long term solution.

It could always be an issue with your code but we can’t see it so oh well

The only part, where the code runs the bot, is client.run at the very end

It’s not the problem with glitch. The problem is that the same script is running on a different computer/project, or something is going faulty in his code, or discord is having a issue.

No, use client.login();

Thats python.
Also, as I said, my code isn’t running anywhere else, nor computer nor another project.
Another thing is, even some loops run twice sometimes which causes them to error.

I guess, maybe discord is having issues.

But maybe something is in your code is breaks and sends it twice.