Skip to content

Commit fc10774

Browse files
feat: allow deletion of ephemeral messages (#8774)
* feat: allow deletion of ephemeral messages * fix: restore missing key Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 68d5712 commit fc10774

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

packages/discord.js/src/errors/ErrorCodes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
* @property {'InteractionAlreadyReplied'} InteractionAlreadyReplied
129129
* @property {'InteractionNotReplied'} InteractionNotReplied
130130
* @property {'InteractionEphemeralReplied'} InteractionEphemeralReplied
131+
* <warn>This property is deprecated.</warn>
131132
132133
* @property {'CommandInteractionOptionNotFound'} CommandInteractionOptionNotFound
133134
* @property {'CommandInteractionOptionType'} CommandInteractionOptionType

packages/discord.js/src/structures/interfaces/InteractionResponses.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ class InteractionResponses {
164164
* .catch(console.error);
165165
*/
166166
async deleteReply() {
167-
if (this.ephemeral) throw new DiscordjsError(ErrorCodes.InteractionEphemeralReplied);
168167
await this.webhook.deleteMessage('@original');
169168
}
170169

packages/discord.js/typings/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3246,6 +3246,7 @@ export enum DiscordjsErrorCodes {
32463246

32473247
InteractionAlreadyReplied = 'InteractionAlreadyReplied',
32483248
InteractionNotReplied = 'InteractionNotReplied',
3249+
/** @deprecated */
32493250
InteractionEphemeralReplied = 'InteractionEphemeralReplied',
32503251

32513252
CommandInteractionOptionNotFound = 'CommandInteractionOptionNotFound',

0 commit comments

Comments
 (0)