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
MrMythical
MrMythical3y ago
it means you passed the token incorrectly
Squid
Squid3y ago
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
ItsActuallyTJ
ItsActuallyTJOP3y ago
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
Squid
Squid3y ago
But what does it log in your index.js ?
MrMythical
MrMythical3y ago
token or TOKEN 🤔
ItsActuallyTJ
ItsActuallyTJOP3y ago
ItsActuallyTJ
ItsActuallyTJOP3y ago
this is output from console.log(token); returns the string intact
MrMythical
MrMythical3y ago
show how you pass in the token
ItsActuallyTJ
ItsActuallyTJOP3y ago
one sec
ItsActuallyTJ
ItsActuallyTJOP3y ago
ItsActuallyTJ
ItsActuallyTJOP3y ago
does token need to be uppercase on the .env?
MrMythical
MrMythical3y ago
well in .env did you make it uppercase?
ItsActuallyTJ
ItsActuallyTJOP3y ago
if so why does it work on one machine and not another sadge lemme try that
MrMythical
MrMythical3y ago
No it won't work
ItsActuallyTJ
ItsActuallyTJOP3y ago
no I mean it is uppercase in .env
MrMythical
MrMythical3y ago
it is :o
ItsActuallyTJ
ItsActuallyTJOP3y ago
yeah
MrMythical
MrMythical3y ago
ok then yeah lowercase it
ItsActuallyTJ
ItsActuallyTJOP3y ago
kk im actually crying @Myth 🌈 it worked
MrMythical
MrMythical3y ago
YouDidIt
ItsActuallyTJ
ItsActuallyTJOP3y ago
ig vscode doesnt care if its uppercase or not that's weird lol like i said, same code on both machines
MrMythical
MrMythical3y ago
well it doesn't have typings for .env...
ItsActuallyTJ
ItsActuallyTJOP3y ago
gotcha anyway thnx
MrMythical
MrMythical3y ago
👍
Want results from more Discord servers?
Add your server