fix(InteractionResponses): set replied status on editReply (#5899)

Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
This commit is contained in:
Pronin Egor
2021-06-24 09:07:33 +10:00
committed by GitHub
parent d930c812bb
commit 6d3d00b445

View File

@@ -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;
}
/**