Ask coding questions

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

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 [earned 5 cycles]
View Answer
Voters
SURYANKKHANDAIK
MAORtk123
AlexTheCod3r
HATERVACER
DiordnasDarkunn
Comments
hotnewtop
Mosrod

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

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

EnzoSucks

i cant turn on my discord bot and i alredy tried using a new token in a .env file. (i did it in python btw)

T4N3

Hi, I don't think this is just with repl.it, 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

@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 Repl.it?

DiordnasDarkunn

@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

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