Update to latest eris-fleet, fixed reload bug
This commit is contained in:
parent
e738bc2468
commit
33c00f2954
3 changed files with 9 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue