Update to latest eris-fleet, fixed reload bug

This commit is contained in:
Essem 2022-01-04 14:05:24 -06:00
parent e738bc2468
commit 33c00f2954
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
3 changed files with 9 additions and 9 deletions

View file

@ -5,8 +5,8 @@ class ReloadCommand extends Command {
run() {
return new Promise((resolve) => {
const owners = process.env.OWNER.split(",");
if (!owners.includes(this.message.author.id)) resolve("Only the bot owner can reload commands!");
if (this.args.length === 0) resolve("You need to provide a command to reload!");
if (!owners.includes(this.message.author.id)) return resolve("Only the bot owner can reload commands!");
if (this.args.length === 0) return resolve("You need to provide a command to reload!");
this.ipc.broadcast("reload", this.args[0]);
this.ipc.register("reloadSuccess", () => {
this.ipc.unregister("reloadSuccess");
@ -25,4 +25,4 @@ class ReloadCommand extends Command {
static arguments = ["[command]"];
}
export default ReloadCommand;
export default ReloadCommand;