darabok v0.0.0-dead
Darabok Framework
To be noted: This framework is in beta, so don't expect too much from it!
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');
}
}
}
4 years ago
4 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago