JaBa/base/BaseCommand.js

23 lines
659 B
JavaScript
Raw Permalink Normal View History

/* 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 {Boolean}
*/
this.ownerOnly = (options.ownerOnly === true ? true : false) || false;
this.dirname = options.dirname || false;
/**
* @type {String}
*/
2023-07-05 00:58:06 +05:00
this.category = this.dirname ? this.dirname.split(path.sep)[parseInt(this.dirname.split(path.sep).length - 1, 10)] : "Other";
}
}
2023-07-05 00:58:06 +05:00
module.exports = BaseCommand;