a powerful djs command handler
npm install @archfachnad/djs-command-handlernpm
npm i @archfachnad/djs-command-handler
`
## Example
`Example
const { Client, GatewayIntentBits } = require('discord.js');
const CH = require('@archfachnad/djs-command-handler');
require('dotenv/config');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
],
});
client.once("ready", (i) => { // Self explanatory
console.log(${i.user.tag} is ready!); // Self explanatory
new CH({
client, // This imports the client (important to have this!)
events: {
dir: path.join(process.cwd(), "src", "events"), // Directory where your event files are located
},
featuresDir: path.join(process.cwd(), "src", "features"), // Directory where your features files are located
commandsDir: path.join(process.cwd(), "src", "commands"), // Directory where your command files are located
});
});
client.login(process.env.Token_Here); // Logs into the bot with the bots token
`
Creating Commands
`Example
export default {
run: async ({ message }) => {
await message.reply('pong')
},
}
``