Ask coding questions

← Back to all posts
How do I access my Discord.js token without giving it out
TorCenta (0)

doing node . in shell gives me the error that it has an invalid token. I think that this is because it is having trouble accessing the hidden variable. Can you help me?

Comments
hotnewtop
Coder100 (18873)

It will never work if you try running the bot on the shell. You must run it through .replit
so make a .replit file and add:

run = "node ."

the run command is basically bash.

TorCenta (0)

it has worked before, but because I don't want to give the token out I'm trying to tuse the "secrets" tab on the left and it isn't [email protected]

InvisibleOne (3200)

Use the secrets tab on the left side of the screen, and then use the code it generates to get the value of that token.