Skip to content

Commit

Permalink
fix(InteractionResponses): throw error on deleting response of unackn…
Browse files Browse the repository at this point in the history
…owledged interaction (#10587)

fix: error on deleting response of non-acknowledged interaction

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and Jiralite committed Nov 11, 2024
1 parent 13471fa commit 21c283f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ class InteractionResponses {
* .catch(console.error);
*/
async deleteReply(message = '@original') {
if (!this.deferred && !this.replied) throw new DiscordjsError(ErrorCodes.InteractionNotReplied);

await this.webhook.deleteMessage(message);
}

Expand Down

0 comments on commit 21c283f

Please sign in to comment.