I'm a Discord Bot Developer and here is mine bot handler
a discord.js handler which support slash commands , message commands , events and more...
1. Install node.js v16 or higher
2. Download this repo and unzip it | or git clone it
3. Fill in everything in settings/config.js
4. after Fill everything in config Type in shall npm install
5. start the bot with node index.js
{
token: "BOT_TOKEN"
prefix: "BOT_PREFIX",
}
- easy to use Handler
- support event Handler
- slash commands support
- message commands support
- based on discord.js
- provied code snipet for commands
- support sub directory in commands folder
- support code suggestions in Handler
If you have any feedback, please reach out to us at Discord Server
- Commands Example
// chat input slash commands
const { CommandInteraction, ApplicationCommandType } = require("discord.js");
const BOT = require("../../../handlers/Client");
module.exports = {
name: "",
description: ``,
userPermissions: [],
botPermissions: [],
category: "",
cooldown: 10,
type: ApplicationCommandType.ChatInput,
/**
*
* @param {BOT} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
// Code
},
};
// message input slash commands
const {
ContextMenuCommandInteraction,
ApplicationCommandType,
} = require("discord.js");
const BOT = require("../../../handlers/Client");
module.exports = {
name: "",
category: "",
type: ApplicationCommandType.Message,
/**
*
* @param {BOT} client
* @param {ContextMenuCommandInteraction} interaction
*/
run: async (client, interaction) => {
// Code
},
};
// user slash commands
const {
ContextMenuCommandInteraction,
ApplicationCommandType,
} = require("discord.js");
const BOT = require("../../../handlers/Client");
module.exports = {
name: "",
category: "",
type: ApplicationCommandType.User,
/**
*
* @param {BOT} client
* @param {ContextMenuCommandInteraction} interaction
*/
run: async (client, interaction) => {
// Code
},
};
// message commands
const { Message } = require("discord.js");
const BOT = require("../../../handlers/Client");
module.exports = {
name: "",
description: ``,
userPermissions: [],
botPermissions: [],
category: "",
cooldown: 10,
/**
*
* @param {BOT} client
* @param {Message} message
* @param {String[]} args
* @param {String} prefix
*/
run: async (client, message, args, prefix) => {
// Code
},
};