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 11:22:12 +00:00
committed by GitHub
co-authored by kodiakhq[bot]
parent 68d5712dea
commit fc10774461
3 changed files with 2 additions and 1 deletions
@@ -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
View File
@@ -3246,6 +3246,7 @@ export enum DiscordjsErrorCodes {
InteractionAlreadyReplied = 'InteractionAlreadyReplied',
InteractionNotReplied = 'InteractionNotReplied',
/** @deprecated */
InteractionEphemeralReplied = 'InteractionEphemeralReplied',
CommandInteractionOptionNotFound = 'CommandInteractionOptionNotFound',