Skip to main content

Developer Environment

Scripts

Scripts or NPM scripts are ways to create reusable bash/shell commands such as:

"scripts": {
"hi": "echo \"hello world\"",
},

And can be executed using the following syntax.

npm run SCRIPT_NAME

# or in special cases such as `start`

npm start
namedescriptionrequirement
startuses nodemon/TSX to start your Discord bot with live reloading.None
deploy:globalDeploys your Discord bot's commands globally. Learn moreHave global deployment added
deploy:guildDeploys your Discord bot's commands in a guild. Learn moreHave guild deployment added

ENV

The .env file in your root directory contains secret information about your discord bot required for the bot to function correctly.

danger

Do not leak this file! Doing so could lead to malicious attempts by people to abuse your bot! If you're using Git, remember to include this in the .gitignore file.

Configuration

namedescription
DISCORD_TOKENYour Discord bot's token is used by the code to log in.
CLIENT_IDYour Discord bot's client id is used by the code to deploy your commands.
GUILD_IDYour Discord bot's guild id is used by the code to deploy your commands with guild scope.