1.1.2 • Published 6 years ago

sd-cmd-handler v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

How to use.

const cmd = require('sd-cmd-handler');
const Discord = require('discord.js');
const client = new cmd({prefix: 'YOUR PREFIX HERE'});
const bot = new Discord.Client();

bot.on("ready", () => {
    console.log('Ready!');
});

bot.on("message", async msg => {
    client.messageInstance(msg).clientInstance(bot).handle('COMMANDS DIR HERE)' //I recommend you make a folder named "commands" then here you'd put "__dirname + '/commands'"
});

Now make some commands. The template is here:

module.exports.run = async (bot, msg, args) => { //No need to define args because the package already defines it.
    //Executed code when command ran.
}

module.exports.config = {
    name: 'COMMAND NAME HERE',
    description: 'DESCRIPTION NAME HERE'
}
1.1.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago