This project is a bot infrastructure prepared using version 14 of the Discord.js library. It provides an easy-to-use, flexible, and extensible structure, allowing you to quickly develop your own Discord bot.
- Node.js v16 or higher
- NPM or Yarn
-
Clone this project:
git clone https://github.com/Danteon0/discord-bot-template-v14.git cd discord-bot-template-v14
-
Install the necessary dependencies:
npm install
-
Edit the
config.json
file and enter the required information:{ "author": ["AUTHOR_ID"], // Your discord client ID "token": "BOT_TOKEN", // Bot token "clientId": "CLIENT_ID", // Bot client ID "embedcolor": "#5865f2" // Embed color for manage embed colors one line }
-
Upload slash commands to discord:
node deploy-commands.js
-
Start the bot:
node main.js
- Commands are located in the
commands
folder. To add a new command, create a new JavaScript file in this folder. - Events are located in the
events
folder. To add a new event, create a new JavaScript file in this folder.
We welcome contributions! Please read the CONTRIBUTING.md file before contributing.
This project is licensed under the MIT License.
You can use this infrastructure to develop your own bot projects and contribute to the Discord community. Happy coding!
- Go to the Discord Developer Portal.
- Click on the "New Application" button.
- Enter a name for your application and click "Create".
- Navigate to the "Bot" section on the left sidebar.
- Click on "Add Bot" and confirm.
- Your bot is now created. You can find the "Token" here, which you will use in your
config.json
.
- In the "Bot" section of your application, click on the "Copy" button under the "Token" section.
- Paste this token into the
config.json
file as shown above.
- In the "Bot" section of your application, scroll down to the "Privileged Gateway Intents" section.
- Enable the "Presence Intent" and "Server Members Intent" if your bot requires them.
- Go to the "OAuth2" section on the left sidebar.
- Click on "URL Generator".
- In the "Scopes" section, select "bot" and "applications.commands".
- In the "Bot Permissions" section, select the permissions your bot needs.
- Copy the generated URL and use it to invite your bot to your server.
- Go to the Node.js official website.
- Download the LTS version suitable for your operating system.
- Follow the installation instructions provided.
If you need help or have any questions, feel free to reach out:
- Join our Discord server: Join here
- Visit our website: emirhankaya.net
- Follow on Twitter: Danteon0
By following these detailed instructions, you can set up your own Discord bot using this infrastructure. Enjoy building your bot!