diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index d80c980e..f63b7f0c 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -50,7 +50,8 @@ export type TextChannelType = | ChannelType.GuildText | ChannelType.GuildForum | ChannelType.GuildVoice - | ChannelType.GuildStageVoice; + | ChannelType.GuildStageVoice + | ChannelType.GuildMedia; export type GuildChannelType = Exclude; @@ -124,7 +125,7 @@ export interface APIGuildTextChannel */ default_thread_rate_limit_per_user?: number; /** - * The channel topic (0-4096 characters for forum channels, 0-1024 characters for all others) + * The channel topic (0-4096 characters for thread-only channels, 0-1024 characters for all others) */ topic?: string | null; } @@ -240,7 +241,7 @@ export interface APIThreadChannel */ total_message_sent?: number; /** - * The IDs of the set of tags that have been applied to a thread in a forum channel + * The IDs of the set of tags that have been applied to a thread in a thread-only channel */ applied_tags: Snowflake[]; } @@ -317,25 +318,31 @@ export enum ForumLayoutType { GalleryView, } -export interface APIGuildForumChannel extends APIGuildTextChannel { +export interface APIThreadOnlyChannel + extends APIGuildTextChannel { /** - * The set of tags that can be used in a forum channel + * The set of tags that can be used in a thread-only channel */ available_tags: APIGuildForumTag[]; /** - * The emoji to show in the add reaction button on a thread in a forum channel + * The emoji to show in the add reaction button on a thread in a thread-only channel */ default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null; /** - * The default sort order type used to order posts in a forum channel + * The default sort order type used to order posts in a thread-only channel */ default_sort_order: SortOrderType | null; +} + +export interface APIGuildForumChannel extends APIThreadOnlyChannel { /** * The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin */ default_forum_layout: ForumLayoutType; } +export type APIGuildMediaChannel = APIThreadOnlyChannel; + /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */ @@ -348,7 +355,8 @@ export type APIChannel = | APIGuildStageVoiceChannel | APIGuildCategoryChannel | APIThreadChannel - | APIGuildForumChannel; + | APIGuildForumChannel + | APIGuildMediaChannel; /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-types @@ -410,6 +418,12 @@ export enum ChannelType { * A channel that can only contain threads */ GuildForum, + /** + * A channel like forum channels but contains media for server subscriptions + * + * See https://creator-support.discord.com/hc/articles/14346342766743 + */ + GuildMedia, // EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS // @@ -1744,6 +1758,10 @@ export enum ChannelFlags { * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsScheduledForDeletion = 1 << 9, + /** + * Whether media download options are hidden. + */ + HideMediaDownloadOptions = 1 << 15, } /** diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index b53a4979..e7c86b37 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -50,7 +50,8 @@ export type TextChannelType = | ChannelType.GuildText | ChannelType.GuildForum | ChannelType.GuildVoice - | ChannelType.GuildStageVoice; + | ChannelType.GuildStageVoice + | ChannelType.GuildMedia; export type GuildChannelType = Exclude; @@ -124,7 +125,7 @@ export interface APIGuildTextChannel */ default_thread_rate_limit_per_user?: number; /** - * The channel topic (0-1024 characters) + * The channel topic (0-4096 characters for thread-only channels, 0-1024 characters for all others) */ topic?: string | null; } @@ -236,7 +237,7 @@ export interface APIThreadChannel */ total_message_sent?: number; /** - * The IDs of the set of tags that have been applied to a thread in a forum channel + * The IDs of the set of tags that have been applied to a thread in a thread-only channel */ applied_tags: Snowflake[]; } @@ -313,25 +314,31 @@ export enum ForumLayoutType { GalleryView, } -export interface APIGuildForumChannel extends APIGuildTextChannel { +export interface APIThreadOnlyChannel + extends APIGuildTextChannel { /** - * The set of tags that can be used in a forum channel + * The set of tags that can be used in a thread-only channel */ available_tags: APIGuildForumTag[]; /** - * The emoji to show in the add reaction button on a thread in a forum channel + * The emoji to show in the add reaction button on a thread in a thread-only channel */ default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null; /** - * The default sort order type used to order posts in a forum channel + * The default sort order type used to order posts in a thread-only channel */ default_sort_order: SortOrderType | null; +} + +export interface APIGuildForumChannel extends APIThreadOnlyChannel { /** * The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin */ default_forum_layout: ForumLayoutType; } +export type APIGuildMediaChannel = APIThreadOnlyChannel; + /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */ @@ -344,7 +351,8 @@ export type APIChannel = | APIGuildStageVoiceChannel | APIGuildCategoryChannel | APIThreadChannel - | APIGuildForumChannel; + | APIGuildForumChannel + | APIGuildMediaChannel; /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-types @@ -406,6 +414,12 @@ export enum ChannelType { * A channel that can only contain threads */ GuildForum, + /** + * A channel like forum channels but contains media for server subscriptions + * + * See https://creator-support.discord.com/hc/articles/14346342766743 + */ + GuildMedia, // EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS /** @@ -1712,6 +1726,10 @@ export enum ChannelFlags { * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsScheduledForDeletion = 1 << 9, + /** + * Whether media download options are hidden. + */ + HideMediaDownloadOptions = 1 << 15, } /** diff --git a/deno/rest/v10/channel.ts b/deno/rest/v10/channel.ts index 39aa065a..3e1ba7a5 100644 --- a/deno/rest/v10/channel.ts +++ b/deno/rest/v10/channel.ts @@ -23,6 +23,7 @@ import type { APIGuildForumDefaultReactionEmoji, SortOrderType, ForumLayoutType, + ChannelFlags, } from '../../payloads/v10/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts'; @@ -60,15 +61,15 @@ export interface RESTPatchAPIChannelJSONBody { */ position?: number | null | undefined; /** - * 0-1024 character channel topic (0-4096 characters for forum channels) + * 0-1024 character channel topic (0-4096 characters for thread-only channels) * - * Channel types: text, news, forum + * Channel types: text, news, forum, media */ topic?: string | null | undefined; /** * Whether the channel is nsfw * - * Channel types: text, voice, news, forum + * Channel types: text, voice, news, forum, media */ nsfw?: boolean | null | undefined; /** @@ -76,7 +77,7 @@ export interface RESTPatchAPIChannelJSONBody { * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, * are unaffected * - * Channel types: text, newsThread, publicThread, privateThread, forum + * Channel types: text, newsThread, publicThread, privateThread, forum, media */ rate_limit_per_user?: number | null | undefined; /** @@ -100,7 +101,7 @@ export interface RESTPatchAPIChannelJSONBody { /** * ID of the new parent category for a channel * - * Channel types: text, voice, news + * Channel types: text, voice, news, stage, forum, media */ parent_id?: Snowflake | null | undefined; /** @@ -136,9 +137,19 @@ export interface RESTPatchAPIChannelJSONBody { /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity * - * Channel types: text, news + * Channel types: text, news, forum, media */ default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined; + /** + * Channel flags combined as a bit field. + */ + flags?: ChannelFlags | undefined; + /** + * The set of tags that can be used in a thread-only channel; limited to 20 + * + * Channel types: forum, media + */ + available_tags?: (Partial & Pick)[] | undefined; /** * Whether non-moderators can add other non-moderators to the thread * @@ -146,28 +157,22 @@ export interface RESTPatchAPIChannelJSONBody { */ invitable?: boolean | undefined; /** - * The set of tags that can be used in a forum channel; limited to 20 + * The emoji to show in the add reaction button on a thread in a thread-only channel * - * Channel types: forum - */ - available_tags?: (Partial & Pick)[] | undefined; - /** - * The emoji to show in the add reaction button on a thread in a forum channel - * - * Channel types: forum + * Channel types: forum, media */ default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined; /** * The initial `rate_limit_per_user` to set on newly created threads in a channel. * This field is copied to the thread at creation time and does not live update * - * Channel types: forum + * Channel types: text, forum, media */ default_thread_rate_limit_per_user?: number | null | undefined; /** - * The default sort order type used to order posts in a forum channel + * The default sort order type used to order posts in a thread-only channel * - * Channel types: forum + * Channel types: forum, media */ default_sort_order?: SortOrderType | null | undefined; /** @@ -614,25 +619,25 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody { } /** - * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-media-channel */ export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & { /** - * First message in the forum thread + * The initial message of the thread */ message: RESTPostAPIChannelMessageJSONBody; /** - * The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5 + * The IDs of the set of tags to apply to the thread; limited to 5 */ applied_tags?: Snowflake[] | undefined; }; /** - * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel */ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & { /** - * First message in the forum thread + * The initial message of the thread */ message: string; }; diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index 1485af61..46f4c536 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -23,6 +23,7 @@ import type { APIGuildForumDefaultReactionEmoji, SortOrderType, ForumLayoutType, + ChannelFlags, } from '../../payloads/v9/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts'; @@ -60,15 +61,15 @@ export interface RESTPatchAPIChannelJSONBody { */ position?: number | null | undefined; /** - * 0-1024 character channel topic (0-4096 characters for forum channels) + * 0-1024 character channel topic (0-4096 characters for thread-only channels) * - * Channel types: text, news, forum + * Channel types: text, news, forum, media */ topic?: string | null | undefined; /** * Whether the channel is nsfw * - * Channel types: text, voice, news, forum + * Channel types: text, voice, news, forum, media */ nsfw?: boolean | null | undefined; /** @@ -76,7 +77,7 @@ export interface RESTPatchAPIChannelJSONBody { * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, * are unaffected * - * Channel types: text, newsThread, publicThread, privateThread, forum + * Channel types: text, newsThread, publicThread, privateThread, forum, media */ rate_limit_per_user?: number | null | undefined; /** @@ -100,7 +101,7 @@ export interface RESTPatchAPIChannelJSONBody { /** * ID of the new parent category for a channel * - * Channel types: text, voice, news + * Channel types: text, voice, news, stage, forum, media */ parent_id?: Snowflake | null | undefined; /** @@ -136,9 +137,19 @@ export interface RESTPatchAPIChannelJSONBody { /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity * - * Channel types: text, news + * Channel types: text, news, forum, media */ default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined; + /** + * Channel flags combined as a bit field. + */ + flags?: ChannelFlags | undefined; + /** + * The set of tags that can be used in a thread-only channel; limited to 20 + * + * Channel types: forum, media + */ + available_tags?: (Partial & Pick)[] | undefined; /** * Whether non-moderators can add other non-moderators to the thread * @@ -146,28 +157,22 @@ export interface RESTPatchAPIChannelJSONBody { */ invitable?: boolean | undefined; /** - * The set of tags that can be used in a forum channel; limited to 20 + * The emoji to show in the add reaction button on a thread in a thread-only channel * - * Channel types: forum - */ - available_tags?: (Partial & Pick)[] | undefined; - /** - * The emoji to show in the add reaction button on a thread in a forum channel - * - * Channel types: forum + * Channel types: forum, media */ default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined; /** * The initial `rate_limit_per_user` to set on newly created threads in a channel. * This field is copied to the thread at creation time and does not live update * - * Channel types: forum + * Channel types: text, forum, media */ default_thread_rate_limit_per_user?: number | null | undefined; /** - * The default sort order type used to order posts in a forum channel + * The default sort order type used to order posts in a thread-only channel * - * Channel types: forum + * Channel types: forum, media */ default_sort_order?: SortOrderType | null | undefined; /** @@ -630,25 +635,25 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody { } /** - * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-media-channel */ export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & { /** - * First message in the forum thread + * The initial message of the thread */ message: RESTPostAPIChannelMessageJSONBody; /** - * The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5 + * The IDs of the set of tags to apply to the thread; limited to 5 */ applied_tags?: Snowflake[] | undefined; }; /** - * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel */ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & { /** - * First message in the forum thread + * The initial message of the thread */ message: string; }; diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index df70a693..36609147 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -50,7 +50,8 @@ export type TextChannelType = | ChannelType.GuildText | ChannelType.GuildForum | ChannelType.GuildVoice - | ChannelType.GuildStageVoice; + | ChannelType.GuildStageVoice + | ChannelType.GuildMedia; export type GuildChannelType = Exclude; @@ -124,7 +125,7 @@ export interface APIGuildTextChannel */ default_thread_rate_limit_per_user?: number; /** - * The channel topic (0-4096 characters for forum channels, 0-1024 characters for all others) + * The channel topic (0-4096 characters for thread-only channels, 0-1024 characters for all others) */ topic?: string | null; } @@ -240,7 +241,7 @@ export interface APIThreadChannel */ total_message_sent?: number; /** - * The IDs of the set of tags that have been applied to a thread in a forum channel + * The IDs of the set of tags that have been applied to a thread in a thread-only channel */ applied_tags: Snowflake[]; } @@ -317,25 +318,31 @@ export enum ForumLayoutType { GalleryView, } -export interface APIGuildForumChannel extends APIGuildTextChannel { +export interface APIThreadOnlyChannel + extends APIGuildTextChannel { /** - * The set of tags that can be used in a forum channel + * The set of tags that can be used in a thread-only channel */ available_tags: APIGuildForumTag[]; /** - * The emoji to show in the add reaction button on a thread in a forum channel + * The emoji to show in the add reaction button on a thread in a thread-only channel */ default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null; /** - * The default sort order type used to order posts in a forum channel + * The default sort order type used to order posts in a thread-only channel */ default_sort_order: SortOrderType | null; +} + +export interface APIGuildForumChannel extends APIThreadOnlyChannel { /** * The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin */ default_forum_layout: ForumLayoutType; } +export type APIGuildMediaChannel = APIThreadOnlyChannel; + /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */ @@ -348,7 +355,8 @@ export type APIChannel = | APIGuildStageVoiceChannel | APIGuildCategoryChannel | APIThreadChannel - | APIGuildForumChannel; + | APIGuildForumChannel + | APIGuildMediaChannel; /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-types @@ -410,6 +418,12 @@ export enum ChannelType { * A channel that can only contain threads */ GuildForum, + /** + * A channel like forum channels but contains media for server subscriptions + * + * See https://creator-support.discord.com/hc/articles/14346342766743 + */ + GuildMedia, // EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS // @@ -1744,6 +1758,10 @@ export enum ChannelFlags { * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsScheduledForDeletion = 1 << 9, + /** + * Whether media download options are hidden. + */ + HideMediaDownloadOptions = 1 << 15, } /** diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index e4a71854..a9bce02d 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -50,7 +50,8 @@ export type TextChannelType = | ChannelType.GuildText | ChannelType.GuildForum | ChannelType.GuildVoice - | ChannelType.GuildStageVoice; + | ChannelType.GuildStageVoice + | ChannelType.GuildMedia; export type GuildChannelType = Exclude; @@ -124,7 +125,7 @@ export interface APIGuildTextChannel */ default_thread_rate_limit_per_user?: number; /** - * The channel topic (0-1024 characters) + * The channel topic (0-4096 characters for thread-only channels, 0-1024 characters for all others) */ topic?: string | null; } @@ -236,7 +237,7 @@ export interface APIThreadChannel */ total_message_sent?: number; /** - * The IDs of the set of tags that have been applied to a thread in a forum channel + * The IDs of the set of tags that have been applied to a thread in a thread-only channel */ applied_tags: Snowflake[]; } @@ -313,25 +314,31 @@ export enum ForumLayoutType { GalleryView, } -export interface APIGuildForumChannel extends APIGuildTextChannel { +export interface APIThreadOnlyChannel + extends APIGuildTextChannel { /** - * The set of tags that can be used in a forum channel + * The set of tags that can be used in a thread-only channel */ available_tags: APIGuildForumTag[]; /** - * The emoji to show in the add reaction button on a thread in a forum channel + * The emoji to show in the add reaction button on a thread in a thread-only channel */ default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null; /** - * The default sort order type used to order posts in a forum channel + * The default sort order type used to order posts in a thread-only channel */ default_sort_order: SortOrderType | null; +} + +export interface APIGuildForumChannel extends APIThreadOnlyChannel { /** * The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin */ default_forum_layout: ForumLayoutType; } +export type APIGuildMediaChannel = APIThreadOnlyChannel; + /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */ @@ -344,7 +351,8 @@ export type APIChannel = | APIGuildStageVoiceChannel | APIGuildCategoryChannel | APIThreadChannel - | APIGuildForumChannel; + | APIGuildForumChannel + | APIGuildMediaChannel; /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-types @@ -406,6 +414,12 @@ export enum ChannelType { * A channel that can only contain threads */ GuildForum, + /** + * A channel like forum channels but contains media for server subscriptions + * + * See https://creator-support.discord.com/hc/articles/14346342766743 + */ + GuildMedia, // EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS /** @@ -1712,6 +1726,10 @@ export enum ChannelFlags { * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsScheduledForDeletion = 1 << 9, + /** + * Whether media download options are hidden. + */ + HideMediaDownloadOptions = 1 << 15, } /** diff --git a/rest/v10/channel.ts b/rest/v10/channel.ts index 869daac1..97ebb0e8 100644 --- a/rest/v10/channel.ts +++ b/rest/v10/channel.ts @@ -23,6 +23,7 @@ import type { APIGuildForumDefaultReactionEmoji, SortOrderType, ForumLayoutType, + ChannelFlags, } from '../../payloads/v10/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals'; @@ -60,15 +61,15 @@ export interface RESTPatchAPIChannelJSONBody { */ position?: number | null | undefined; /** - * 0-1024 character channel topic (0-4096 characters for forum channels) + * 0-1024 character channel topic (0-4096 characters for thread-only channels) * - * Channel types: text, news, forum + * Channel types: text, news, forum, media */ topic?: string | null | undefined; /** * Whether the channel is nsfw * - * Channel types: text, voice, news, forum + * Channel types: text, voice, news, forum, media */ nsfw?: boolean | null | undefined; /** @@ -76,7 +77,7 @@ export interface RESTPatchAPIChannelJSONBody { * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, * are unaffected * - * Channel types: text, newsThread, publicThread, privateThread, forum + * Channel types: text, newsThread, publicThread, privateThread, forum, media */ rate_limit_per_user?: number | null | undefined; /** @@ -100,7 +101,7 @@ export interface RESTPatchAPIChannelJSONBody { /** * ID of the new parent category for a channel * - * Channel types: text, voice, news + * Channel types: text, voice, news, stage, forum, media */ parent_id?: Snowflake | null | undefined; /** @@ -136,9 +137,19 @@ export interface RESTPatchAPIChannelJSONBody { /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity * - * Channel types: text, news + * Channel types: text, news, forum, media */ default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined; + /** + * Channel flags combined as a bit field. + */ + flags?: ChannelFlags | undefined; + /** + * The set of tags that can be used in a thread-only channel; limited to 20 + * + * Channel types: forum, media + */ + available_tags?: (Partial & Pick)[] | undefined; /** * Whether non-moderators can add other non-moderators to the thread * @@ -146,28 +157,22 @@ export interface RESTPatchAPIChannelJSONBody { */ invitable?: boolean | undefined; /** - * The set of tags that can be used in a forum channel; limited to 20 + * The emoji to show in the add reaction button on a thread in a thread-only channel * - * Channel types: forum - */ - available_tags?: (Partial & Pick)[] | undefined; - /** - * The emoji to show in the add reaction button on a thread in a forum channel - * - * Channel types: forum + * Channel types: forum, media */ default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined; /** * The initial `rate_limit_per_user` to set on newly created threads in a channel. * This field is copied to the thread at creation time and does not live update * - * Channel types: forum + * Channel types: text, forum, media */ default_thread_rate_limit_per_user?: number | null | undefined; /** - * The default sort order type used to order posts in a forum channel + * The default sort order type used to order posts in a thread-only channel * - * Channel types: forum + * Channel types: forum, media */ default_sort_order?: SortOrderType | null | undefined; /** @@ -614,25 +619,25 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody { } /** - * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-media-channel */ export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & { /** - * First message in the forum thread + * The initial message of the thread */ message: RESTPostAPIChannelMessageJSONBody; /** - * The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5 + * The IDs of the set of tags to apply to the thread; limited to 5 */ applied_tags?: Snowflake[] | undefined; }; /** - * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel */ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & { /** - * First message in the forum thread + * The initial message of the thread */ message: string; }; diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index 449b82e5..310fb17e 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -23,6 +23,7 @@ import type { APIGuildForumDefaultReactionEmoji, SortOrderType, ForumLayoutType, + ChannelFlags, } from '../../payloads/v9/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals'; @@ -60,15 +61,15 @@ export interface RESTPatchAPIChannelJSONBody { */ position?: number | null | undefined; /** - * 0-1024 character channel topic (0-4096 characters for forum channels) + * 0-1024 character channel topic (0-4096 characters for thread-only channels) * - * Channel types: text, news, forum + * Channel types: text, news, forum, media */ topic?: string | null | undefined; /** * Whether the channel is nsfw * - * Channel types: text, voice, news, forum + * Channel types: text, voice, news, forum, media */ nsfw?: boolean | null | undefined; /** @@ -76,7 +77,7 @@ export interface RESTPatchAPIChannelJSONBody { * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, * are unaffected * - * Channel types: text, newsThread, publicThread, privateThread, forum + * Channel types: text, newsThread, publicThread, privateThread, forum, media */ rate_limit_per_user?: number | null | undefined; /** @@ -100,7 +101,7 @@ export interface RESTPatchAPIChannelJSONBody { /** * ID of the new parent category for a channel * - * Channel types: text, voice, news + * Channel types: text, voice, news, stage, forum, media */ parent_id?: Snowflake | null | undefined; /** @@ -136,9 +137,19 @@ export interface RESTPatchAPIChannelJSONBody { /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity * - * Channel types: text, news + * Channel types: text, news, forum, media */ default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined; + /** + * Channel flags combined as a bit field. + */ + flags?: ChannelFlags | undefined; + /** + * The set of tags that can be used in a thread-only channel; limited to 20 + * + * Channel types: forum, media + */ + available_tags?: (Partial & Pick)[] | undefined; /** * Whether non-moderators can add other non-moderators to the thread * @@ -146,28 +157,22 @@ export interface RESTPatchAPIChannelJSONBody { */ invitable?: boolean | undefined; /** - * The set of tags that can be used in a forum channel; limited to 20 + * The emoji to show in the add reaction button on a thread in a thread-only channel * - * Channel types: forum - */ - available_tags?: (Partial & Pick)[] | undefined; - /** - * The emoji to show in the add reaction button on a thread in a forum channel - * - * Channel types: forum + * Channel types: forum, media */ default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined; /** * The initial `rate_limit_per_user` to set on newly created threads in a channel. * This field is copied to the thread at creation time and does not live update * - * Channel types: forum + * Channel types: text, forum, media */ default_thread_rate_limit_per_user?: number | null | undefined; /** - * The default sort order type used to order posts in a forum channel + * The default sort order type used to order posts in a thread-only channel * - * Channel types: forum + * Channel types: forum, media */ default_sort_order?: SortOrderType | null | undefined; /** @@ -630,25 +635,25 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody { } /** - * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-media-channel */ export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & { /** - * First message in the forum thread + * The initial message of the thread */ message: RESTPostAPIChannelMessageJSONBody; /** - * The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5 + * The IDs of the set of tags to apply to the thread; limited to 5 */ applied_tags?: Snowflake[] | undefined; }; /** - * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel */ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & { /** - * First message in the forum thread + * The initial message of the thread */ message: string; };