Token invalid on one machine but not another?
I'm running the latest djs on my windows machine, and the bot is loggin in. However when attempting to move the bot to my linux machine, it throws an error stating that the token is invalid. All packages are installed as well as any dependencies. Please help!
24 Replies
it means you passed the token incorrectly
Your code must not be the same in each machine. You can see that your token is either falsy or not a string, so log it and see what it is
im passing the token the same way on each machine
using a dotenv file
which is required in the code
did that too, one sec
this is in my .env TOKEN="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
and in the code, it pulls it with process.env.token
But what does it log in your index.js ?
token or TOKEN 🤔
this is output from console.log(token);
returns the string intact
show how you pass in the token
one sec
does token need to be uppercase on the .env?
well in .env did you make it uppercase?
if so why does it work on one machine and not another lemme try that
No it won't work
no I mean it is uppercase in .env
it is :o
yeah
ok then yeah lowercase it
kk
im actually crying
@Myth 🌈 it worked
ig vscode doesnt care if its uppercase or not
that's weird lol
like i said, same code on both machines
well it doesn't have typings for .env...
gotcha
anyway
thnx
👍