Are Discord Bot tokens safe?

So im new to replit, and im currently hosting a discord bot elsewhere, but i also want to run some code i found on replit alongside it, heres the thing: you click on secret, and then for the key you type “Token” and then for value you type the bots token, but as you know, tokens for discord bots are as valuable as passwords, and i am worried of my bots token not being safe. So i was wondering, would it be better if i created a separate bot, or is the token safe? The code you use is also forked, but it is also public, so this wouldn’t mean anyone else would see the token right? i assume not, since it is known as “secret” but im more concerned that maybe the creator of the code would be able to see it? Sorry if I sound dumb, i am new to replit, and i am just making sure that everything is safe. Thanks.

1 Like

Secrets are safe, as everyone who forks a Repl has to provide their own value to the name. Just be sure you don’t share the token!


As long as you store your discord token in secrets and never actually put it in your code, it’s safe. Anytime someone else runs or forks your repl, they are running/forking their own version of that repl that doesn’t come with your secrets.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.