- Discord Bot Application within Discord Developers portal.
- Follow this guide here.
- Node - Version 20.
git clone https://github.com/Renoks-Dev/Discord_Bot_v14_Template
cd Discord_Bot_v14_Template
npm install
npm start
Use npm run dev
to have nodemon restart the discord bot application for you, whenever you save a file.
Copy and rename .env-example
to .env
and fill out the values of your Discord Bot Application from the Discord Developers Portal.
Warning
Never commit or share your values in .env
with anyone that you don't trust or don't work with on the same bot.
Tip
GUILD_ID is optional. Currently it's only used for deploying commands to a specific Guild. You can leave it empty if you're not going to be deploying commands to a specific Guild.
{
TOKEN=
CLIENT_ID=
GUILD_ID=
}
/randomcolor
- Generates a random color in HEX, RGB and HSL.
/flip
- Flips a coin.
/roll
- Roll a dice.
/avatar
- Display your avatar or another user's avatar.
/serverinfo
- Display some of the server's information.
/userinfo
- Display some user information about your account or another user's account.
/ping
- Bot replies with pong!
You can deploy your slash commands globally or to a specific guild.
- Run
npm run deploy-commands-global
. - After it is finished, the commands should be updated in all guilds the bot is in.
- Fill in your GUILD_ID in
.env
file. - Run
npm run deploy-commands-guild
. - After it is finished, the commands should be updated in all guilds the bot is in.