diff --git a/packages/discord.js/src/errors/ErrorCodes.js b/packages/discord.js/src/errors/ErrorCodes.js index f0566a0433a8..b5faf0c1cefa 100644 --- a/packages/discord.js/src/errors/ErrorCodes.js +++ b/packages/discord.js/src/errors/ErrorCodes.js @@ -128,6 +128,7 @@ * @property {'InteractionAlreadyReplied'} InteractionAlreadyReplied * @property {'InteractionNotReplied'} InteractionNotReplied * @property {'InteractionEphemeralReplied'} InteractionEphemeralReplied + * This property is deprecated. * @property {'CommandInteractionOptionNotFound'} CommandInteractionOptionNotFound * @property {'CommandInteractionOptionType'} CommandInteractionOptionType diff --git a/packages/discord.js/src/structures/interfaces/InteractionResponses.js b/packages/discord.js/src/structures/interfaces/InteractionResponses.js index f8f32ebe607d..f85fd7fe9a14 100644 --- a/packages/discord.js/src/structures/interfaces/InteractionResponses.js +++ b/packages/discord.js/src/structures/interfaces/InteractionResponses.js @@ -164,7 +164,6 @@ class InteractionResponses { * .catch(console.error); */ async deleteReply() { - if (this.ephemeral) throw new DiscordjsError(ErrorCodes.InteractionEphemeralReplied); await this.webhook.deleteMessage('@original'); } diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index e2586331a58d..3f68e6f21e4c 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -3246,6 +3246,7 @@ export enum DiscordjsErrorCodes { InteractionAlreadyReplied = 'InteractionAlreadyReplied', InteractionNotReplied = 'InteractionNotReplied', + /** @deprecated */ InteractionEphemeralReplied = 'InteractionEphemeralReplied', CommandInteractionOptionNotFound = 'CommandInteractionOptionNotFound',