From 53231465c0cb750af4573bdec04d005e22b6bbbb Mon Sep 17 00:00:00 2001 From: MARCROCK22 Date: Sat, 26 Apr 2025 11:28:20 -0400 Subject: [PATCH] fix(editOrReply): accept flags when editing message --- src/common/types/write.ts | 5 ++++- src/structures/Interaction.ts | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/types/write.ts b/src/common/types/write.ts index 5a15808..edbef6e 100644 --- a/src/common/types/write.ts +++ b/src/common/types/write.ts @@ -5,6 +5,7 @@ import type { APIInteractionResponseCallbackData, APIInteractionResponseChannelMessageWithSource, APIModalInteractionResponse, + MessageFlags, RESTAPIPollCreate, RESTPatchAPIChannelMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, @@ -52,7 +53,9 @@ export type InteractionMessageUpdateBodyRequest = OmitInsert< RESTPatchAPIWebhookWithTokenMessageJSONBody, 'components' | 'embeds' | 'poll', SendResolverProps ->; +> & { + flags?: MessageFlags; +}; export type ComponentInteractionMessageUpdate = OmitInsert< APIInteractionResponseCallbackData, diff --git a/src/structures/Interaction.ts b/src/structures/Interaction.ts index f830226..a2407a3 100644 --- a/src/structures/Interaction.ts +++ b/src/structures/Interaction.ts @@ -490,8 +490,8 @@ export class Interaction< fetchReply?: FR, ): Promise { if (await this.replied) { - const { content, embeds, allowed_mentions, components, files, attachments, poll } = body; - return this.editResponse({ content, embeds, allowed_mentions, components, files, attachments, poll }); + const { content, embeds, allowed_mentions, components, files, attachments, poll, flags } = body; + return this.editResponse({ content, embeds, allowed_mentions, components, files, attachments, poll, flags }); } return this.write(body as InteractionCreateBodyRequest, fetchReply); }