await a promise
This commit is contained in:
parent
09a3931d88
commit
26b397d33d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user