2022-07-25 22:09:02 +05:00
|
|
|
/* eslint-disable no-unused-vars */
|
2022-07-26 17:20:10 +05:00
|
|
|
const path = require("path");
|
|
|
|
|
2022-07-23 17:14:42 +05:00
|
|
|
class BaseCommand {
|
2022-07-25 22:09:02 +05:00
|
|
|
constructor(options, client) {
|
2022-07-23 17:14:42 +05:00
|
|
|
/**
|
2022-07-31 17:08:00 +05:00
|
|
|
* @type {import("discord.js").SlashCommandBuilder | import("discord.js").ApplicationCommandData}
|
2022-07-23 17:14:42 +05:00
|
|
|
*/
|
|
|
|
this.command = options.command;
|
|
|
|
/**
|
|
|
|
* @type {Array<String>}
|
|
|
|
*/
|
2022-07-25 22:09:02 +05:00
|
|
|
this.aliases = options.aliases || [];
|
2022-07-23 17:14:42 +05:00
|
|
|
/**
|
|
|
|
* @type {Boolean}
|
|
|
|
*/
|
|
|
|
this.guildOnly = options.guildOnly || true;
|
2022-07-25 22:09:02 +05:00
|
|
|
/**
|
|
|
|
* @type {Boolean}
|
|
|
|
*/
|
|
|
|
this.ownerOnly = options.ownerOnly || false;
|
2022-07-26 17:20:10 +05:00
|
|
|
/**
|
2022-07-26 19:46:32 +05:00
|
|
|
* @type __dirname
|
2022-07-26 17:20:10 +05:00
|
|
|
*/
|
|
|
|
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");
|
2022-07-23 17:14:42 +05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = BaseCommand;
|