mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-12-02 01:54:58 +05:00
23 lines
602 B
JavaScript
23 lines
602 B
JavaScript
|
const path = require("path");
|
||
|
|
||
|
module.exports = class Command {
|
||
|
constructor(client, {
|
||
|
name = null,
|
||
|
dirname = false,
|
||
|
enabled = true,
|
||
|
guildOnly = false,
|
||
|
aliases = new Array(),
|
||
|
botPermissions = new Array(),
|
||
|
memberPermissions = new Array(),
|
||
|
nsfw = false,
|
||
|
ownerOnly = false,
|
||
|
cooldown = 3000
|
||
|
})
|
||
|
|
||
|
{
|
||
|
const category = (dirname ? dirname.split(path.sep)[parseInt(dirname.split(path.sep).length - 1, 10)] : "Other");
|
||
|
this.client = client;
|
||
|
this.conf = { enabled, guildOnly, memberPermissions, botPermissions, nsfw, ownerOnly, cooldown};
|
||
|
this.help = { name, category, aliases };
|
||
|
}
|
||
|
};
|