fix(editOrReply): accept flags when editing message

This commit is contained in:
MARCROCK22 2025-04-26 11:28:20 -04:00
parent faa222275f
commit 53231465c0
2 changed files with 6 additions and 3 deletions

View File

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

View File

@ -490,8 +490,8 @@ export class Interaction<
fetchReply?: FR,
): Promise<WebhookMessageStructure> {
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);
}