2022-07-25 22:09:02 +05:00
|
|
|
/* eslint-disable no-unused-vars */
|
2024-12-05 19:16:01 +05:00
|
|
|
import { sep } from "path";
|
2022-07-26 17:20:10 +05:00
|
|
|
|
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 18:52:16 +05:00
|
|
|
* @type {import("discord.js").SlashCommandBuilder | import("discord.js").ContextMenuCommandBuilder | import("discord.js").ApplicationCommandData}
|
2022-07-23 17:14:42 +05:00
|
|
|
*/
|
|
|
|
this.command = options.command;
|
2022-07-25 22:09:02 +05:00
|
|
|
/**
|
|
|
|
* @type {Boolean}
|
|
|
|
*/
|
2022-10-09 18:16:10 +05:00
|
|
|
this.ownerOnly = (options.ownerOnly === true ? true : false) || false;
|
2022-07-26 17:20:10 +05:00
|
|
|
this.dirname = options.dirname || false;
|
|
|
|
/**
|
|
|
|
* @type {String}
|
|
|
|
*/
|
2024-12-05 19:16:01 +05:00
|
|
|
this.category = this.dirname ? this.dirname.split(sep)[parseInt(this.dirname.split(sep).length - 1, 10)] : "Other";
|
2022-07-23 17:14:42 +05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-12-05 19:16:01 +05:00
|
|
|
export default BaseCommand;
|