Ask coding questions

← Back to all posts
Can't Turn off Discord Bot!
DiordnasDarkunn (3)

I wrote a bot in Python, following the tutorial in last week's newsletter, but I'm having some problems.
I closed the tab with my repl, opened it later, edited it, and hit play, but then the discord bot started doing things twice, presumably because it was running two instances of the code. I can't edit or disable the old version of the code! How do I shut it off?

Answered by Mosrod (548) [earned 5 cycles]
View Answer
Mosrod (548)

Generate a new token and change the code to the new token. Make sure you do not share your token by putting the token in a .env file.

DiordnasDarkunn (3)

@Mosrod Good idea! I'll be trying this later!

T4N3 (0)

Hi, I don't think this is just with, I am having the exact same problem with my javascript bot that I run of my computer. I think its most likely to be a problem with Discord.

timmy_i_chen (1180)

@DiordnasDarkunn The fix for this bug is being pushed out now - shouldn't be a problem after today :) Just curious, by the way, how did you find out about

DiordnasDarkunn (3)

@timmy_i_chen Thanks for fixing it!
In response to your sneaky survey, either I saw a friend using it, or I was looking for LOLcode interpreters - it's so long ago I don't remember.

timmy_i_chen (1180)

But in general, this should not be happen in and we'll be fixing this soon. Sorry for the trouble.