Skip to content

Commit

Permalink
fix(InteractionResponses): set replied status on editReply (#5899)
Browse files Browse the repository at this point in the history
Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
  • Loading branch information
3 people committed Jun 23, 2021
1 parent d930c81 commit 6d3d00b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/structures/interfaces/InteractionResponses.js
Expand Up @@ -114,9 +114,11 @@ class InteractionResponses {
* .then(console.log)
* .catch(console.error);
*/
editReply(options) {
async editReply(options) {
if (!this.deferred && !this.replied) throw new Error('INTERACTION_NOT_REPLIED');
return this.webhook.editMessage('@original', options);
const message = await this.webhook.editMessage('@original', options);
this.replied = true;
return message;
}

/**
Expand Down

0 comments on commit 6d3d00b

Please sign in to comment.