This project consists of a discord bot template created using the discord.js library in version 14.13.0. This template uses ESM (The discord.js documentation uses CJS).
Functions in the code are self-explained in order to understand each code section.
If you would like to use this template, you just need to follow the next steps:
- Clone the repo and install dependencies.
- Follow these steps to create a discord bot and take its token.
- Create a .env file and load the required values. If you have problems finding the values use the following guides: DISCORD_TOKEN: https://discordjs.guide/preparations/setting-up-a-bot-application.html#your-bot-s-token APP ID & SERVER ID: https://discordjs.guide/creating-your-bot/command-deployment.html#guild-commands
- Deploy commands executing node deploy-commands.js in the terminal.
- Start your bot server executing node index.js or npm start.
You could access more information about discord.js and how to create a bot in this link https://discordjs.guide/#before-you-begin