@tehpixel/discord-commandhandler
v1.1.1
Published
A simple command handler for discord.js bots
Downloads
44
Maintainers
Readme
Discord-Command-Handler
A simple npm module to use command with Discord-Command-Handler
Installation
npm install @tehpixel/discord-commandhandler
// After add this handler you can add to your bot free commands
const CommandHandler = require('@tehpixel/discord-commandhandler');
const bot = new CommandHandler('YOUR_BOT_TOKEN', prefix); // change the to your bot token and insted of the prefix , put your prefix exemple: "!", "?", "$";
// Register a command
bot.addCommand('ping', (message) => {
message.reply('Pong!');
});
bot.addCommand('hello', (message) => {
message.reply('Hello, world!');
});
// Start the bot
bot.start();