From 26b397d33d12fb9d06333cad284792dcbbc2c633 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Sat, 15 Jan 2022 02:23:12 +0200 Subject: [PATCH] await a promise --- src/structure/components/observers/CommandHandler.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/structure/components/observers/CommandHandler.js b/src/structure/components/observers/CommandHandler.js index a015bf9..9b78c87 100644 --- a/src/structure/components/observers/CommandHandler.js +++ b/src/structure/components/observers/CommandHandler.js @@ -73,8 +73,7 @@ class CommandHandler extends Observer { async _executeCommand(thing, options) { try { - const resolved = thing.command.execute(thing, options); - if(resolved instanceof Promise) await resolved; + await thing.command.execute(thing, options); } catch(error) { this.client.logger.error(error.stack || error); this._generateError(thing);