A basic Discord bot with a /example
command to get started quickly. This repository is designed to be easy to set up and customize.
- Simple and extensible slash commands.
- Organized structure with support for separate command files.
- Scripts for easy installation and startup.
- Node.js version 16.9.0 or higher.
- A Discord account with access to the Discord Developer Portal.
- A bot application configured in the Developer Portal.
Download or clone the repository locally:
https://github.com/AlphaX50/Discord-Bot-Base.git
cd Discord-Bot-Base
Run the install_requirements.bat script to install the required dependencies:
install_requirements.bat
This will install all the necessary packages, including discord.js, which is required to run the bot.
Modify the config.json file at the root of the project and fill in the necessary values:
{
"token": "BOT_TOKEN",
"clientId": "APPLICATION_ID",
"guildId": "GUILD_ID_(OPTIONAL)",
"debug" : false,
"moderator": ""
}
- Go to the Discord Developer Portal.
- Select your application or create a new one.
- Go to the Bot tab, and click Reset Token to generate a new token.
- Copy the token and paste it into the config.json file, replacing "BOT TOKEN".
- In the Discord Developer Portal, click on your application.
- Find the Application ID in the General Information section.
- Copy the Application ID and paste it into the config.json file, replacing "APPLICATION ID".
- Use the following link to add the bot to your Discord server:
https://discord.com/oauth2/authorize?client_id=YOUR_APPLICATION_ID_HERE&scope=bot%20applications.commands&permissions=8
- Replace YOUR_APPLICATION_ID with your bot’s Application ID.
- Grant the required permissions and invite the bot to your server.
To start the bot, use the start.bat script:
start.bat
Or (in terminal)
node index.js
If you encounter any issues or need assistance, feel free to reach out to me on Discord: alphax50.