Skip to content

Commit d2e1924

Browse files
sdanialrazaJiralite
authored andcommittedJan 18, 2025··
types: add undefined to flags for exactOptionalPropertyTypes (#10707)
1 parent 68dd260 commit d2e1924

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed
 

‎packages/discord.js/typings/index.d.ts

+14-11
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
ModalActionRowComponentBuilder,
1414
ModalBuilder as BuildersModal,
1515
AnyComponentBuilder,
16-
ComponentBuilder,
1716
type RestOrArray,
1817
ApplicationCommandOptionAllowedChannelTypes,
1918
} from '@discordjs/builders';
@@ -6506,7 +6505,7 @@ export interface InteractionCollectorOptions<
65066505
export interface InteractionDeferReplyOptions {
65076506
/** @deprecated Use {@link InteractionDeferReplyOptions.flags} instead. */
65086507
ephemeral?: boolean;
6509-
flags?: BitFieldResolvable<Extract<MessageFlagsString, 'Ephemeral'>, MessageFlags.Ephemeral>;
6508+
flags?: BitFieldResolvable<Extract<MessageFlagsString, 'Ephemeral'>, MessageFlags.Ephemeral> | undefined;
65106509
withResponse?: boolean;
65116510
/** @deprecated Use {@link InteractionDeferReplyOptions.withResponse} instead. */
65126511
fetchReply?: boolean;
@@ -6525,10 +6524,12 @@ export interface InteractionReplyOptions extends BaseMessageOptionsWithPoll {
65256524
withResponse?: boolean;
65266525
/** @deprecated Use {@link InteractionReplyOptions.withResponse} instead. */
65276526
fetchReply?: boolean;
6528-
flags?: BitFieldResolvable<
6529-
Extract<MessageFlagsString, 'Ephemeral' | 'SuppressEmbeds' | 'SuppressNotifications'>,
6530-
MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
6531-
>;
6527+
flags?:
6528+
| BitFieldResolvable<
6529+
Extract<MessageFlagsString, 'Ephemeral' | 'SuppressEmbeds' | 'SuppressNotifications'>,
6530+
MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
6531+
>
6532+
| undefined;
65326533
}
65336534

65346535
export interface InteractionUpdateOptions extends MessageEditOptions {
@@ -6723,10 +6724,12 @@ export interface MessageCreateOptions extends BaseMessageOptionsWithPoll {
67236724
enforceNonce?: boolean;
67246725
reply?: ReplyOptions;
67256726
stickers?: readonly StickerResolvable[];
6726-
flags?: BitFieldResolvable<
6727-
Extract<MessageFlagsString, 'SuppressEmbeds' | 'SuppressNotifications'>,
6728-
MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
6729-
>;
6727+
flags?:
6728+
| BitFieldResolvable<
6729+
Extract<MessageFlagsString, 'SuppressEmbeds' | 'SuppressNotifications'>,
6730+
MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
6731+
>
6732+
| undefined;
67306733
}
67316734

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

67466749
export type MessageReactionResolvable = MessageReaction | Snowflake | string;

0 commit comments

Comments
 (0)
Please sign in to comment.