0.0.0-dead • Published 4 years ago

darabok v0.0.0-dead

Weekly downloads
37
License
MIT
Repository
-
Last release
4 years ago

Darabok Framework

To be noted: This framework is in beta, so don't expect too much from it!

NPM Dependencies

Installing: npm install darabok

All the required folders (currently commands and events) will be automatically generated by the bot if they don't exist yet!

Legend

args inside a command: the message received split by spaces
A monitor is a module that you can use to track any message containing something, even if it doesn't contain the prefix.

Examples

Client Example:

const { Client } = require('darabok');

new Client({
    prefix: 'yourPrefix', 
    ownerID: 'yourID'
}).login('yourToken');

Command Example (needs to be placed in the "commands" folder):

const { Command } = require('darabok');

module.exports = class extends Command {
    constructor(client) {
        super(client, {
            name: '',
            description: '',
            ownerOnly: false,
            guildOnly: false,
            enabled: true,
            cooldown: 0,
            aliases: [],
            botPermissions: ["SEND_MESSAGES"],
            usage: ''
        })
    }

    run(message, args) {
        // you do your stuff here
    }
}

Event Example (needs to be placed in the "events" folder):

const { Event } = require('darabok');

module.exports = class extends Event {
    constructor(client) {
        super(client);
        this.name = 'EventNameHere';
    }

    run(/* Optional "arguments" for the event */) {
        
    }
}

Monitor Example (needs to be placed in the "monitors" folder):

const { Monitor } = require('darabok');

module.exports = class extends Monitor {
    constructor(client) {
        super(client);
        this.name = 'monitorNameHere';
    }

    run(message) {
        if (message.content.includes('test')) {
            message.reply('Hello there! You had the word "test" in your message');
        }
    }
}
0.0.0-dead

4 years ago

0.0.0

4 years ago

0.5.5

6 years ago

0.5.4

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago