This is a basic template for Discord.js created to streamline development and for educational purposes.
https://discord.js.org/#/docs/discord.js/main/general/welcome
https://discordjs.guide/#before-you-begin
- Download this project
- Run
npm i
in VSCode terminal - Go to your
.env
file and create corrections
BOT_TOKEN = "YOUR_BOT_TOKEN"
clientId = "YOUR_BOT_ID"
guildId = "YOUR_DISCORD_SERVER_ID"
- Run
npm run dev-start
in VSCode (Please remember to clickctrl+c
in terminal to end your bot) - Write your code! AND REMEMBER TO SAVE WITH
ctrl+s
. Pro tip: VSCode will display a circle on files that are NOT saved
To run tests, run the following command
npm run test
To start the bot with nodemon for development, run the following command:
npm run dev-start
To start the bot normally, run the following command:
npm start
To deploy application commands ( / ) to a server, run the following command:
npm run deploy
To deploy application commands ( / ) globally, run the following command:
npm run deploy-global