Environment Variables
Make sure to have a .gitignore file to prevent this being upload to github repo
Create your .env
file with the following information:
You can find your bot Client Id: (Discord Developer Portal > "General Information" > application id)
In hosting server, such as heroku, there is a section to place your variables and do not need the .env
unless you are hosting the bot on your local computer
To access the DISCORD_TOKEN or other environment variables you can just type process.env.DISCORD_TOKEN
You can access these variables by using process.env.VARIABLE_NAME
process.env.DISCORD_TOKEN
Last updated