mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
06a5fbd724
Фиксики, поддерка контекстных команд
33 lines
No EOL
825 B
JavaScript
33 lines
No EOL
825 B
JavaScript
/* eslint-disable no-unused-vars */
|
|
const path = require("path");
|
|
|
|
class BaseCommand {
|
|
constructor(options, client) {
|
|
/**
|
|
* @type {import("discord.js").SlashCommandBuilder | import("discord.js").ContextMenuCommandBuilder | import("discord.js").ApplicationCommandData}
|
|
*/
|
|
this.command = options.command;
|
|
/**
|
|
* @type {Array<String>}
|
|
*/
|
|
this.aliases = options.aliases || [];
|
|
/**
|
|
* @type {Boolean}
|
|
*/
|
|
this.guildOnly = options.guildOnly || true;
|
|
/**
|
|
* @type {Boolean}
|
|
*/
|
|
this.ownerOnly = options.ownerOnly || false;
|
|
/**
|
|
* @type __dirname
|
|
*/
|
|
this.dirname = options.dirname || false;
|
|
/**
|
|
* @type {String}
|
|
*/
|
|
this.category = (this.dirname ? this.dirname.split(path.sep)[parseInt(this.dirname.split(path.sep).length - 1, 10)] : "Other");
|
|
}
|
|
}
|
|
|
|
module.exports = BaseCommand; |