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:
Ryan Munro
2022-10-27 22:22:12 +11:00
committed by GitHub
parent 68d5712dea
commit fc10774461
3 changed files with 2 additions and 1 deletions

View File

@@ -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

View File

@@ -164,7 +164,6 @@ class InteractionResponses {
* .catch(console.error);
*/
async deleteReply() {
if (this.ephemeral) throw new DiscordjsError(ErrorCodes.InteractionEphemeralReplied);
await this.webhook.deleteMessage('@original');
}

View File

@@ -3246,6 +3246,7 @@ export enum DiscordjsErrorCodes {
InteractionAlreadyReplied = 'InteractionAlreadyReplied',
InteractionNotReplied = 'InteractionNotReplied',
/** @deprecated */
InteractionEphemeralReplied = 'InteractionEphemeralReplied',
CommandInteractionOptionNotFound = 'CommandInteractionOptionNotFound',