Files
discordeno/examples/nodejs/Plugins/Developer/commands/reload.js
Awesome Stickz 80eabe5f44 Emoji rest methods (node-migration-clean) (#2713)
* feat: all emoji rest methods

* Fix code style issues with ESLint

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2023-01-05 15:16:20 -06:00

20 lines
772 B
JavaScript

const BaseCommand = require("../../../Structures/BaseCommand.js");
class reloadcommand extends BaseCommand {
static name = "reload";
static description = "Reloads a Command";
static category = "Developer";
static slash = { name: "reload", category: "dev" };
constructor(data) {
super(data);
}
async execute() {
if (!this.client.config.owners.includes(String(this.user.id))) return;
if (!this.args[0]) return this.reply({ content: "**You must provide a command to reload!**" });
const op = this.client.commands.reloadCommand(this.args[0]);
if (!op) return this.reply({ content: "**That command doesn't exist!**" });
return this.reply({ content: "**Reloaded Command: `" + this.args[0] + "`**" });
}
}
module.exports = reloadcommand;