0.3.1 • Published 5 years ago

eris-commando v0.3.1

Weekly downloads
31
License
-
Repository
-
Last release
5 years ago

eris-commando

eris-commando is a command router (framework) for the Eris library.

Examples

If you're just starting bot development, I advise you to set the defaultHelpCommand option enabled.

Creating a command

const { Command } = require('eris-commando');

module.exports = class MyCommand extends Command {
    constructor(bot) {
        super(bot, {
            command: 'test',
            description: 'A debug testing command, what did you expect?',
            usage: 'test [...args]',
            category: 'Test',
            aliases: ['debug'],
            hidden: false,
            owner: false,
            guild: true,
            disabled: false
        });
    }

    async run(msg) {
        if (!msg.args[0])
            return msg.reply("No content to respond?");
        else
            return msg.codeblock(null, msg.args.slice(0).join(' '));
    }
};

Using an event

const { Event } = require('eris-commando');

module.exports = class ReadyEvent extends Event {
    constructor(bot) {
        super(bot, { event: 'ready', emitter: 'on' });
    }

    run() {
        console.log('I\'m online!');
    }
};

Creating the CommandoClient and setting up!

const { CommandoClient } = require('eris-commando');
const path = require('path');

const discord = new CommandoClient({
    token: '',
    commands: path.join(__dirname, 'commands'),
    events: path.join(__dirname, 'events'),
    groupCommands: true,
    prefix: '!',
    owner: ['280158289667555328'],
    defaultHelpCommand: true,
    invite: 'https://discord.gg/some_invite',
    options: {
        maxShards: 'auto',
        disableEveryone: true,
        autoreconnect: true
    }
});
discord.setup();

Bots that use eris-commando:

  • Noel: Made by August#5820
  • Yokitsu: made by August#5820 and void#0001

Submit a PR to add your bot if you use the library!

0.3.1

5 years ago

0.3.0

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.0.1

6 years ago