Skip to content
📝 Command router for the Eris library.
JavaScript TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
src
test
typings
.gitignore
LICENSE
README.md
package.json
yarn.lock

README.md

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!

You can’t perform that action at this time.