discordjs-base-handler
discordjs-base-handler copied to clipboard
Improve Discord.js bot with organized Slash Commands, events, and error handling. Use discord.js, Node.js.
Hi, I'm Kabir! 👋
I'm a Discord Bot Developer and here is mine bot handler
Discord.JS V14 Handler
a discord.js handler which support slash commands , message commands , events and more...
Installation | How to use the Bot
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
Modify - config.js
{
token: "BOT_TOKEN"
prefix: "BOT_PREFIX",
}
Handler Features
- 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
Feedback
If you have any feedback, please reach out to us at Discord Server
Usage/Examples
- 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
},
};