Instantiating Secret Token for Discord Bot
JoemerRamos

Hello all, I created a project in node js, but am using the nix shell to load an updated version of node js since the default node js shell is at v12. I'm having issues calling the secret token from the nix shell through my JavaScript code. I'm currently trying to destructure the process.env but I guess it doesn't work because of the nix shell. Any help is appreciated.

You are viewing a single comment. View All
AmoghTheCool

@JoemerRamos what language are you using to get the secrets (node or bash)? For node it is console.log(process.env.TOKEN), TOKEN being the key to the secret. For bash, just use $TOKEN.

JoemerRamos

@AmoghTheCool Hi! Im using node, but when I tried that, it returned undefined.

AmoghTheCool

@JoemerRamos replace TOKEN with the actually secret's name