This project is a command handler for a Discord bot built using the Discord.js library. It enables the bot to easily manage and execute slash commands in a structured and organized manner. This setup is ideal for developers looking to streamline their Discord bot's functionality.
- Slash Command Support: Easily add and manage slash commands.
- Modular Structure: Each command is defined in its own file, promoting code organization and maintainability.
- Embed Support: Use Discord embeds for rich message formatting.
- User and Bot Management: List users and bots in the server with simple commands.
- Node.js (v16.9.0 or higher)
- Discord.js (v14 or higher)
- A Discord bot token
-
Clone the repository:
git clone https://github.com/HrSApI/discordjs-handler-v14.git cd discordjs-handler-v14
-
Install dependencies:
npm install
-
Set up your bot token and mongodbURL:
- Create a
.env
file in the root directory of the project and add your token:TOKEN=your_bot_token_here MONGO_URL=your_mongodb_url_here
- Create a
-
Start the bot:
node index.js
-
Interact with your bot on Discord using the registered slash commands.
/list
: Displays a list of users and bots in the server./ping
: Displays the bot's response time.
Contributions are welcome! If you have suggestions or improvements, feel free to create a pull request or open an issue.
This project is licensed under the MIT License. See the LICENSE file for details.
- Discord.js for the powerful library that makes building Discord bots easier.
- Node.js for the JavaScript runtime.