1.0.3 • Published 4 years ago

djs-cmd v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

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

  1. Make sure that you have discord.js installed - To install it do npm i discord.js in the terminal.
  2. 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"]
};
1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago