Ask coding questions

← Back to all posts
.env file not working
milanuses (0)

im trying to hide my discord bot token but my .env file isnt working, i get this error

ReferenceError: procces is not defined
    at Object.<anonymous> (/home/runner/discordbot/config.js:3:10)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at /home/runner/discordbot/index.js:2:16
    at Script.runInContext (vm.js:130:18)
    at Object.<anonymous> (/run_dir/interp.js:209:20)
    at Module._compile (internal/modules/cjs/loader.js:999:30)Hint: hit control+c anytime to enter REPL.
Answered by InvisibleOne (2677) [earned 5 cycles]
View Answer
Comments
hotnewtop
InvisibleOne (2677)

you spelled it wrong, it is process not procces

InvisibleOne (2677)

on line 73 change it to bot.login(process.env.TOKEN)

milanuses (0)

Ok thank you! it works now.