discocommander
v1.0.3
Published
A Easy To Use Discord Command Handler
Downloads
15
Readme
DiscoCommander
DiscoCommander is a lightweight and flexible command handler manager for Discord.js, designed to simplify the process of managing and executing commands in your Discord bot.
New Update
Added A Administration Option
Added Performance Boosts To Make This Faster For Low End Hosts/Devices
Added A Option To Change Execute to Run Instead As We Put The Code Below
Installation
To install DiscoCommander, simply run:
npm i discocommander
Usage
To use DiscoCommander in your Discord bot, follow these steps:
index.js:
const { Client, Intents } = require('discord.js');
const DiscoCommander = require('discocommander');
const path = require('path');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });
const commandHandler = new DiscoCommander(client, {
prefix: '!',
commandsDir: path.join(__dirname, 'commands'),
cooldown: 0,
});
client.once('ready', () => {
console.log('Bot is online!');
});
client.login('TOKEN');
Ping.js:
module.exports = {
name: 'ping',
description: 'Responds with Pong!',
admin: true // Optional Put False If you do not want this to check for Permissions
execute(message, args) {
message.channel.send('Pong.');
},
};
Another Ping.js
const { MessageEmbed } = require("discord.js")
module.exports = {
name: 'ping',
description: 'Responds With The Bot Ping',
admin: true,
run: async (client, message, args) => {
message.channel.send(`My Ping is ${client.ws.ping}ms`);
},
};
- You Can Put The Run function or execute
Important Information
You Can Change commands to what ever you want and also You can do stuff like ./commands/information/ping.js or ./commands/ping.js its up to you
This Is V13 We Are Not Sure If This Will Work For V14 But We Will Make A V14 Package Soon
Credits
Relational Throne
Relational Hosting
Discord
https://discord.gg/relationalhosting