From 98846cf863c76348e730e6944d4b7390148aa258 Mon Sep 17 00:00:00 2001 From: Raraph84 Date: Fri, 25 Nov 2022 18:35:19 +0100 Subject: [PATCH] fix: backport allow deletion of ephemeral messages to v13 (#8811) Co-authored-by: Noel --- src/errors/Messages.js | 1 + src/structures/interfaces/InteractionResponses.js | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/errors/Messages.js b/src/errors/Messages.js index 3f70d922e..7227db7bb 100644 --- a/src/errors/Messages.js +++ b/src/errors/Messages.js @@ -145,6 +145,7 @@ const Messages = { INTERACTION_ALREADY_REPLIED: 'The reply to this interaction has already been sent or deferred.', INTERACTION_NOT_REPLIED: 'The reply to this interaction has not been sent or deferred.', + /** @deprecated */ INTERACTION_EPHEMERAL_REPLIED: 'Ephemeral responses cannot be deleted.', COMMAND_INTERACTION_OPTION_NOT_FOUND: name => `Required option "${name}" not found.`, diff --git a/src/structures/interfaces/InteractionResponses.js b/src/structures/interfaces/InteractionResponses.js index 8d236a24e..6d99964a8 100644 --- a/src/structures/interfaces/InteractionResponses.js +++ b/src/structures/interfaces/InteractionResponses.js @@ -164,7 +164,6 @@ class InteractionResponses { * .catch(console.error); */ async deleteReply(message = '@original') { - if (this.ephemeral) throw new Error('INTERACTION_EPHEMERAL_REPLIED'); await this.webhook.deleteMessage(message); }