djs-cmd
v1.0.3
Published
- djs-cmd is a npm package that makes it easy to create a command handler for discord.js
Downloads
5
Readme
djs-cmd - not working due to errors
- djs-cmd is a npm package that makes it easy to create a command handler for discord.js
Setup
- Make sure that you have discord.js installed - To install it do npm i discord.js in the terminal.
- install djs-cmd with npm i djs-cmd in the terminal.
Examples
index.js
const discord = require("discord.js");
const bot = new discord.Client();
const Token = "TOKEN";
const djc = require("djs-cmd");
const prefix = "!";
bot.on("message", (message) => {
djc.handler(prefix, discord, "./commands/", bot, Token, message);
});
commands/ping.js
module.exports.run = async (bot, message, args) => {
message.reply("Pong!");
}
module.exports.help = {
name: "ping",
aliases: ["p", "pi"]
};