Skip to content

Commit

Permalink
types: add undefined to flags for exactOptionalPropertyTypes (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanialraza authored and Jiralite committed Jan 18, 2025
1 parent 68dd260 commit d2e1924
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
ModalActionRowComponentBuilder,
ModalBuilder as BuildersModal,
AnyComponentBuilder,
ComponentBuilder,
type RestOrArray,
ApplicationCommandOptionAllowedChannelTypes,
} from '@discordjs/builders';
Expand Down Expand Up @@ -6506,7 +6505,7 @@ export interface InteractionCollectorOptions<
export interface InteractionDeferReplyOptions {
/** @deprecated Use {@link InteractionDeferReplyOptions.flags} instead. */
ephemeral?: boolean;
flags?: BitFieldResolvable<Extract<MessageFlagsString, 'Ephemeral'>, MessageFlags.Ephemeral>;
flags?: BitFieldResolvable<Extract<MessageFlagsString, 'Ephemeral'>, MessageFlags.Ephemeral> | undefined;
withResponse?: boolean;
/** @deprecated Use {@link InteractionDeferReplyOptions.withResponse} instead. */
fetchReply?: boolean;
Expand All @@ -6525,10 +6524,12 @@ export interface InteractionReplyOptions extends BaseMessageOptionsWithPoll {
withResponse?: boolean;
/** @deprecated Use {@link InteractionReplyOptions.withResponse} instead. */
fetchReply?: boolean;
flags?: BitFieldResolvable<
Extract<MessageFlagsString, 'Ephemeral' | 'SuppressEmbeds' | 'SuppressNotifications'>,
MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
>;
flags?:
| BitFieldResolvable<
Extract<MessageFlagsString, 'Ephemeral' | 'SuppressEmbeds' | 'SuppressNotifications'>,
MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
>
| undefined;
}

export interface InteractionUpdateOptions extends MessageEditOptions {
Expand Down Expand Up @@ -6723,10 +6724,12 @@ export interface MessageCreateOptions extends BaseMessageOptionsWithPoll {
enforceNonce?: boolean;
reply?: ReplyOptions;
stickers?: readonly StickerResolvable[];
flags?: BitFieldResolvable<
Extract<MessageFlagsString, 'SuppressEmbeds' | 'SuppressNotifications'>,
MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
>;
flags?:
| BitFieldResolvable<
Extract<MessageFlagsString, 'SuppressEmbeds' | 'SuppressNotifications'>,
MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
>
| undefined;
}

export interface GuildForumThreadMessageCreateOptions
Expand All @@ -6740,7 +6743,7 @@ export interface MessageEditAttachmentData {
export interface MessageEditOptions extends Omit<BaseMessageOptions, 'content'> {
content?: string | null;
attachments?: readonly (Attachment | MessageEditAttachmentData)[];
flags?: BitFieldResolvable<Extract<MessageFlagsString, 'SuppressEmbeds'>, MessageFlags.SuppressEmbeds>;
flags?: BitFieldResolvable<Extract<MessageFlagsString, 'SuppressEmbeds'>, MessageFlags.SuppressEmbeds> | undefined;
}

export type MessageReactionResolvable = MessageReaction | Snowflake | string;
Expand Down

0 comments on commit d2e1924

Please sign in to comment.