mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(InteractionResponses): throw error on deleting response of unacknowledged interaction (#10587)
fix: error on deleting response of non-acknowledged interaction Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -174,6 +174,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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user