Code running twice

Im making a discord bot, and all of sudden the bot started sending messages twice, from experiment i found out: the code running when it’s not supposed to be running is an older version of the code (if i make a line of code it doesnt have that line) and idk how to stop that

Bug appears at this link:

Screenshot(s)/Screen Recording:

Browser/OS/Device: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Replit Profile:

1 Like

You can delete or comment old code so it doesnt run anymore. With python you use

# comment

Welcome to Ask! Several people have had Replit run their projects twice recently; I don’t think Replit was able to reproduce the issue. If you can find a solid way to reproduce it maybe Replit can fix the bug.


Yes I’m aware, but even if the code is not running, this older version continues working. The problem is not in the code (I believe), it feels like an old backup that is still running

1 Like

While the recent issue doesn’t have a true fix currently, running kill 1 in the Repl’s Shell tab will force a Repl restart, and will kill the old and new processes.

1 Like

i see, useful to know, I’ve changed the token so now it works fine, guess i can just do that if it happens again

1 Like


Please let us know if you have any further issues and we’ll be happy to help!

1 Like