fix: accept null as content value

This commit is contained in:
MARCROCK22 2025-06-22 00:20:52 -04:00
parent 798f648955
commit 0720d0c170

View File

@ -16,6 +16,7 @@ import type {
import type { OmitInsert } from './util'; import type { OmitInsert } from './util';
export interface ResolverProps { export interface ResolverProps {
content?: string | undefined | null;
embeds?: Embed[] | APIEmbed[] | undefined; embeds?: Embed[] | APIEmbed[] | undefined;
components?: TopLevelBuilders[] | ReturnType<TopLevelBuilders['toJSON']>[]; components?: TopLevelBuilders[] | ReturnType<TopLevelBuilders['toJSON']>[];
files?: AttachmentBuilder[] | Attachment[] | RawFile[] | undefined; files?: AttachmentBuilder[] | Attachment[] | RawFile[] | undefined;
@ -27,31 +28,31 @@ export interface SendResolverProps extends ResolverProps {
export type MessageCreateBodyRequest = OmitInsert< export type MessageCreateBodyRequest = OmitInsert<
RESTPostAPIChannelMessageJSONBody, RESTPostAPIChannelMessageJSONBody,
'components' | 'embeds' | 'poll', 'components' | 'embeds' | 'poll' | 'content',
SendResolverProps SendResolverProps
>; >;
export type MessageUpdateBodyRequest = OmitInsert< export type MessageUpdateBodyRequest = OmitInsert<
RESTPatchAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody,
'components' | 'embeds', 'components' | 'embeds' | 'content',
ResolverProps ResolverProps
>; >;
export type MessageWebhookCreateBodyRequest = OmitInsert< export type MessageWebhookCreateBodyRequest = OmitInsert<
RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenJSONBody,
'components' | 'embeds' | 'poll', 'components' | 'embeds' | 'poll' | 'content',
SendResolverProps SendResolverProps
>; >;
export type MessageWebhookUpdateBodyRequest = OmitInsert< export type MessageWebhookUpdateBodyRequest = OmitInsert<
RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageJSONBody,
'components' | 'embeds' | 'poll', 'components' | 'embeds' | 'poll' | 'content',
ResolverProps ResolverProps
>; >;
export type InteractionMessageUpdateBodyRequest = OmitInsert< export type InteractionMessageUpdateBodyRequest = OmitInsert<
RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageJSONBody,
'components' | 'embeds' | 'poll', 'components' | 'embeds' | 'poll' | 'content',
SendResolverProps SendResolverProps
> & { > & {
flags?: MessageFlags; flags?: MessageFlags;
@ -59,13 +60,13 @@ export type InteractionMessageUpdateBodyRequest = OmitInsert<
export type ComponentInteractionMessageUpdate = OmitInsert< export type ComponentInteractionMessageUpdate = OmitInsert<
APIInteractionResponseCallbackData, APIInteractionResponseCallbackData,
'components' | 'embeds', 'components' | 'embeds' | 'content',
ResolverProps ResolverProps
>; >;
export type InteractionCreateBodyRequest = OmitInsert< export type InteractionCreateBodyRequest = OmitInsert<
APIInteractionResponseChannelMessageWithSource['data'], APIInteractionResponseChannelMessageWithSource['data'],
'components' | 'embeds' | 'poll', 'components' | 'embeds' | 'poll' | 'content',
SendResolverProps SendResolverProps
>; >;