Welcome to the Discord Bot Template! This open-source project provides a robust foundation for creating your own Discord bot, featuring essential functionalities already integrated. Built with JavaScript, utilizing Node.js v16.9.0 and Discord.js v14, this template allows developers to easily set up a bot with command handling, event management, and more!
With a focus on usability and flexibility, this template enables you to jump right into developing your bot's unique features without worrying about the boilerplate code. Whether you're building a utility bot, a game bot, or anything in between, this template has you covered. Explore its capabilities and customize it to fit your needs!
- Event Handler: Efficiently manage and respond to Discord events.
- Command Handler: Supports both prefix commands and slash commands.
- Context Menu Commands: Easily add context menu commands for improved user interaction.
- Cooldown System: Prevent command spamming with customizable cooldowns.
- Command Registration: Easily register your bot commands on Discord.
- Anti-Crash: Built-in safety mechanisms to ensure your bot stays online.
- Error & Warn Logging: Comprehensive logging system to monitor errors and warnings.
- And many more features waiting for you to explore!
- Discord Bot Token: Follow this guide to create a bot application.
- Ensure you enable "Message Content Intent" in the Discord Developer Portal.
- Node.js version 16.9.0 or higher. It's recommended to use the latest LTS (Long Term Support) version for the best performance and compatibility.
-
Clone the repository:
git clone https://github.com/iTzArshia/Discord-Bot-Template.git
-
Navigate into the project directory:
cd discord-bot-template
-
Install the required dependencies:
npm install
-
Go to
.env
and fill out the values:APPLICATION_ID="CLIENT ID HERE", BOT_TOKEN="BOT TOKEN HERE"
-
Go to
config.json
and fill out the values:{ "prefix": "Your desired command prefix", }
-
After the installation completes, run
node register.js
to deploy application commands, and then runnode index.js
to start the bot. -
Once your bot is up and running, you can start adding your own commands and events by modifying the appropriate files in the
commands
andevents
directories. The template provides examples to help you get started.
You can support me by donating if you like the project!
You can make international, crypto, or Tomanian donations through Reymit
Made with ❤️ and JavaScript, Don't Forget to ⭐