From 2eace55b9b2349bb92cd486266065c88ccd2ad08 Mon Sep 17 00:00:00 2001 From: Fleny Date: Sun, 18 May 2025 22:18:16 +0200 Subject: [PATCH] Specify when IS_COMPONENT_V2 is valid for flags (#4195) --- packages/types/src/discord/channel.ts | 12 ++++++------ packages/types/src/discordeno.ts | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/types/src/discord/channel.ts b/packages/types/src/discord/channel.ts index a3361571d..84f113c4a 100644 --- a/packages/types/src/discord/channel.ts +++ b/packages/types/src/discord/channel.ts @@ -123,11 +123,11 @@ export interface DiscordChannel { /** the emoji to show in the add reaction button on a thread in a GUILD_FORUM or GUILD_MEDIA channel */ default_reaction_emoji?: DiscordDefaultReactionEmoji | null /** - * The initial `rate_limit_per_user` to set on newly created threads in a channel. - * - * @remarks - * This field is copied to the thread at creation time and does not live update. - */ + * The initial `rate_limit_per_user` to set on newly created threads in a channel. + * + * @remarks + * This field is copied to the thread at creation time and does not live update. + */ default_thread_rate_limit_per_user?: number /** the default sort order type used to order posts in GUILD_FORUM channels. Defaults to null, which indicates a preferred sort order hasn't been set by a channel admin */ default_sort_order?: SortOrderTypes | null @@ -411,7 +411,7 @@ export interface DiscordCreateForumPostWithMessage { payload_json?: string /** Attachment objects with filename and description. See {@link https://discord.com/developers/docs/reference#uploading-files Uploading Files} */ attachments?: DiscordAttachment[] - /** Message flags combined as a bitfield, only SUPPRESS_EMBEDS can be set */ + /** Message flags combined as a bitfield, only SUPPRESS_EMBEDS and IS_COMPONENTS_V2 can be set */ flags?: MessageFlags } /** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */ diff --git a/packages/types/src/discordeno.ts b/packages/types/src/discordeno.ts index 73c36cccd..f7558da59 100644 --- a/packages/types/src/discordeno.ts +++ b/packages/types/src/discordeno.ts @@ -102,7 +102,7 @@ export interface CreateMessageOptions { components?: MessageComponents /** IDs of up to 3 stickers in the server to send in the message */ stickerIds?: [BigString] | [BigString, BigString] | [BigString, BigString, BigString] - /** Message flags combined as a bitfield, only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS can be set */ + /** Message flags combined as a bitfield, only SUPPRESS_EMBEDS, SUPPRESS_NOTIFICATIONS, IS_COMPONENTS_V2 can be set */ flags?: MessageFlags /** If true and nonce is present, it will be checked for uniqueness in the past few minutes. If another message was created by the same author with the same nonce, that message will be returned and no new message will be created. */ enforceNonce?: boolean @@ -662,7 +662,7 @@ export interface InteractionCallbackData { title?: string /** The components you would like to have sent in this message */ components?: MessageComponents - /** Message flags combined as a bit field (only `SUPPRESS_EMBEDS`, `EPHEMERAL` and `SUPPRESS_NOTIFICATIONS` can be set) */ + /** Message flags combined as a bit field (only `SUPPRESS_EMBEDS`, `EPHEMERAL`, `SUPPRESS_NOTIFICATIONS` and `IS_COMPONENTS_V2` can be set) */ flags?: number /** Autocomplete choices (max of 25 choices) */ choices?: Camelize @@ -1178,7 +1178,7 @@ export interface CreateForumPostWithMessage { components?: MessageComponents /** IDs of up to 3 stickers in the server to send in the message */ stickerIds?: BigString[] - /** Message flags combined as a bitfield, only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS can be set */ + /** Message flags combined as a bitfield, only SUPPRESS_EMBEDS, SUPPRESS_NOTIFICATIONS and IS_COMPONENTS_V2 can be set */ flags?: MessageFlags } /** The IDs of the set of tags that have been applied to a thread in a GUILD_FORUM or a GUILD_MEDIA channel */