Skip to content

Commit

Permalink
Fix reaction button Promise chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
abalabahaha committed Oct 25, 2017
1 parent e43d1e7 commit 884034c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/command/CommandClient.js
Expand Up @@ -211,17 +211,17 @@ class CommandClient extends Client {
this.unwatchMessage(msg.id, msg.channel.guild && msg.channel.id);
Promise.resolve(action.execute(msg, activeMessage.args)).then((resp) => {
if(resp != null) {
this.editMessage(msg.channel.id, msg.id, resp).catch(function(){});
return this.editMessage(msg.channel.id, msg.id, resp);
}
});
}).catch(function() {});
break;
}
case "edit": {
Promise.resolve(action.execute(msg, activeMessage.args)).then((resp) => {
if(resp != null) {
this.editMessage(msg.channel.id, msg.id, resp).catch(function(){});
return this.editMessage(msg.channel.id, msg.id, resp);
}
});
}).catch(function() {});
break;
}
}
Expand Down

0 comments on commit 884034c

Please sign in to comment.