sbf4d

1.0.4 • Public • Published

SBF4D

Simple Bot Framework For Discord

Installation

$ npm install sbf4d --save

Usage

This module extends the discord.js module so all discord.js methods found here can be used.

Start Bot

./bot.js

const sbf4d = require('sbf4d');
const path = require('path');

let bot = new sbf4d.Client({
    commandPrefix: '!',
    owner: 'Y O U R   D I S C O R D   I D',
    commandGroups: [
        {id: 'test', name:'Test Commands'}
    ],
    commandsPath: path.join(__dirname, './commands')
});

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

bot.login('Y O U R   T O K E N');

Example Command

All commands are placed inside the root commands folder and then under the name of their group.

./commands/test/foo.js

let {Command} = require('sbf4d');

module.exports = class FooCommand extends Command {
    constructor(client) {
        super(client, {
            name: 'Foo',
            group: 'test',
            aliases: [
                'f'
            ],
            throttling: 2000
        })
    }

    run(msg, args) {
        msg.reply('bar');
    }
};

Package Sidebar

Install

npm i sbf4d

Weekly Downloads

1

Version

1.0.4

License

Apache-2.0

Unpacked Size

32.4 kB

Total Files

12

Last publish

Collaborators

  • cruzercru