mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
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>
This commit is contained in:
@@ -128,6 +128,7 @@
|
||||
* @property {'InteractionAlreadyReplied'} InteractionAlreadyReplied
|
||||
* @property {'InteractionNotReplied'} InteractionNotReplied
|
||||
* @property {'InteractionEphemeralReplied'} InteractionEphemeralReplied
|
||||
* <warn>This property is deprecated.</warn>
|
||||
|
||||
* @property {'CommandInteractionOptionNotFound'} CommandInteractionOptionNotFound
|
||||
* @property {'CommandInteractionOptionType'} CommandInteractionOptionType
|
||||
|
||||
@@ -164,7 +164,6 @@ class InteractionResponses {
|
||||
* .catch(console.error);
|
||||
*/
|
||||
async deleteReply() {
|
||||
if (this.ephemeral) throw new DiscordjsError(ErrorCodes.InteractionEphemeralReplied);
|
||||
await this.webhook.deleteMessage('@original');
|
||||
}
|
||||
|
||||
|
||||
1
packages/discord.js/typings/index.d.ts
vendored
1
packages/discord.js/typings/index.d.ts
vendored
@@ -3246,6 +3246,7 @@ export enum DiscordjsErrorCodes {
|
||||
|
||||
InteractionAlreadyReplied = 'InteractionAlreadyReplied',
|
||||
InteractionNotReplied = 'InteractionNotReplied',
|
||||
/** @deprecated */
|
||||
InteractionEphemeralReplied = 'InteractionEphemeralReplied',
|
||||
|
||||
CommandInteractionOptionNotFound = 'CommandInteractionOptionNotFound',
|
||||
|
||||
Reference in New Issue
Block a user