If you are trying to copy the ENTIRE project and then making a video about it, you will get a copyright strike by me if my credits aren't there. To avoid this, edit the project and some of the features so you won't get a strike by me, thank you!
This handler works for in-guild bot, which means for a private bot. So if you are trying to make a public bot, well, you have to edit some of the files in the project... Good luck.
A unique & coolest Discord bot commands handler built with discord.js v14. It handlers only application commands, such as slash commands and context menu commands. So if you want prefix commands, then you can not use this project. By the way, if you want to connect to the database called MongoDB, it is already provided! Just provide your MongoDB URI in the configuration file.
If you liked my repository, you can click on the button ⭐️ Star to add a new star, thank you!
Note If you are interesed about TypeScript Discord bots, you can view this project: Click here
If you are interesed in this project, here are the available features about this project.
This code is not very complicated to understand, you just need some JavaScript knowledgements to understand.
- Role permissions
- Developers only perms
- Owner only perms
- Cooldown
- Logging system
Example command: (Application command structures)
module.exports = {
command_data: { // An object of Application command structure data, from the Discord API (click on the link above)
name: String,
description: String,
type: Number,
options: Array[Object],
},
role_perms: Array[String], // The role permissions for members (role IDs allowed only).
developers_only: Boolean, // Whenever the command is for the bot developers or not.
owner_only: Boolean, // Whenever the command is for bot owner or not.
cooldown: String, // The cooldown of the command (ex: '1s', '10m', '1 week'... etc.).
logger: Boolean, // Enables the logging system (check configuration file and provide the channel ID).
category: String, // The command category (especially required for help command, if you want one).
run: function (...args) { } // The main function to execute the code, make sure to provide all the required args/parameters!
};
This handler handles all possible components interactions, just provide the interaction custom ID. Example:
module.exports = {
customId: String, // The interaction customId.
run: function (...args) { } // The main function to execute the code, make sure to provide all the required args/parameters!
};
- Simple and cool help command
Firstly, initialize the project (install package-lock.json
):
npm init -y
Then install the required dependencies:
npm i discord.js@14 discord.js-v14-helper ms mongoose
The setup for now is for Visual Studio Code users only. If you are a repl.it user and non-beginner programmer, you can read the setup below but you have to edit the Environment processing for MongoDB and the bot token.
- Install Visual Studio Code.
- Install node.js.
- Open command prompt and then type
node -v
and make sure that you have installed node.js version 16.9.0 or above. - Download the project and extract the folder from .zip folder to a normal folder.
- Open the folder on a new VSCode tab.
- Go to
src/config/main.js
and edit the properties of each file. - Open terminal, use the command
cd
to access to your project folder, then typenode index.js
,node .
, ornpm start
. - Enjoy!!!
If you have an issue, do not start to panic! Create an issue right here and wait for me or some people to respond to your errors. Please remember to not create an issue that includes "it's broken", "not working at all", or other similar comments like these, thank you.
Project made with ❤ by T.F.A#7524.