diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index 1764a6339..02234325b 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -108,7 +108,7 @@ export interface APIGuildTextChannel */ default_auto_archive_duration?: ThreadAutoArchiveDuration; /** - * The channel topic (0-1024 characters) + * The channel topic (0-4096 characters for forum channels, 0-1024 characters for all others) */ topic?: string | null; /** @@ -230,9 +230,67 @@ export interface APIThreadChannel * Similar to `message_count` on message creation, but won't decrement when a message is deleted */ total_message_sent?: number; + /** + * The IDs of the set of tags that have been applied to a thread in a forum channel + */ + applied_tags: Snowflake[]; } -export type APIGuildForumChannel = APIGuildTextChannel; +/** + * https://discord.com/developers/docs/resources/channel#forum-tag-object-forum-tag-structure + */ +export interface APIGuildForumTag { + /** + * The id of the tag + */ + id: Snowflake; + /** + * The name of the tag (0-20 characters) + */ + name: string; + /** + * Whether this tag can only be added to or removed from threads by a member with the `MANAGE_THREADS` permission + */ + moderated: boolean; + /** + * The id of a guild's custom emoji + */ + emoji_id: Snowflake | null; + /** + * The unicode character of the emoji + */ + emoji_name: string | null; +} + +/** + * https://discord.com/developers/docs/resources/channel#default-reaction-object-default-reaction-structure + */ +export interface APIGuildForumDefaultReactionEmoji { + /** + * The id of a guild's custom emoji + */ + emoji_id: Snowflake | null; + /** + * The unicode character of the emoji + */ + emoji_name: string | null; +} + +export interface APIGuildForumChannel extends APIGuildTextChannel { + /** + * The set of tags that can be used in a forum channel + */ + available_tags: APIGuildForumTag[]; + /** + * 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 + */ + default_thread_rate_limit_per_user?: number; + /** + * The emoji to show in the add reaction button on a thread in a forum channel + */ + default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null; +} /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure @@ -1429,7 +1487,15 @@ export interface APITextInputComponent extends APIBaseComponent; +/** + * https://discord.com/developers/docs/resources/channel#forum-tag-object-forum-tag-structure + */ +export interface APIGuildForumTag { + /** + * The id of the tag + */ + id: Snowflake; + /** + * The name of the tag (0-20 characters) + */ + name: string; + /** + * Whether this tag can only be added to or removed from threads by a member with the `MANAGE_THREADS` permission + */ + moderated: boolean; + /** + * The id of a guild's custom emoji + */ + emoji_id: Snowflake | null; + /** + * The unicode character of the emoji + */ + emoji_name: string | null; +} + +/** + * https://discord.com/developers/docs/resources/channel#default-reaction-object-default-reaction-structure + */ +export interface APIGuildForumDefaultReactionEmoji { + /** + * The id of a guild's custom emoji + */ + emoji_id: Snowflake | null; + /** + * The unicode character of the emoji + */ + emoji_name: string | null; +} + +export interface APIGuildForumChannel extends APIGuildTextChannel { + /** + * The set of tags that can be used in a forum channel + */ + available_tags: APIGuildForumTag[]; + /** + * 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 + */ + default_thread_rate_limit_per_user?: number; + /** + * The emoji to show in the add reaction button on a thread in a forum channel + */ + default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null; +} /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure @@ -1428,7 +1486,15 @@ export interface APITextInputComponent extends APIBaseComponent; /** @@ -589,6 +610,10 @@ export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThr * First message in the forum thread */ message: RESTPostAPIChannelMessageJSONBody; + /** + * The IDs of the set of tags that have been applied to a thread in a forum channel + */ + applied_tags?: Snowflake[]; }; /** diff --git a/deno/rest/v10/guild.ts b/deno/rest/v10/guild.ts index 0861cd01e..ade857a99 100644 --- a/deno/rest/v10/guild.ts +++ b/deno/rest/v10/guild.ts @@ -53,6 +53,8 @@ export type APIGuildCreatePartialChannel = StrictPartial< | 'rtc_region' | 'video_quality_mode' | 'flags' + | 'default_reaction_emoji' + | 'available_tags' > > & AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{ diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index 6e3fe3c01..1527cee17 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -19,6 +19,8 @@ import type { OverwriteType, ThreadAutoArchiveDuration, VideoQualityMode, + APIGuildForumTag, + APIGuildForumDefaultReactionEmoji, } from '../../payloads/v9/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts'; @@ -56,15 +58,15 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert */ position?: number | null; /** - * 0-1024 character channel topic + * 0-1024 character channel topic (0-4096 characters for forum channels) * - * Channel types: text, news + * Channel types: text, news, forum */ topic?: string | null; /** * Whether the channel is nsfw * - * Channel types: text, voice, news + * Channel types: text, voice, news, forum */ nsfw?: boolean | null; /** @@ -72,7 +74,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, * are unaffected * - * Channel types: text, newsThread, publicThread, privateThread + * Channel types: text, newsThread, publicThread, privateThread, forum */ rate_limit_per_user?: number | null; /** @@ -141,6 +143,25 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert * Channel types: privateThread */ invitable?: boolean; + /** + * The set of tags that can be used in a forum channel + * + * Channel types: forum + */ + available_tags?: APIGuildForumTag[]; + /** + * The emoji to show in the add reaction button on a thread in a forum channel + * + * Channel types: forum + */ + default_reaction_emoji?: APIGuildForumDefaultReactionEmoji; + /** + * 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: text, forum + */ + default_thread_rate_limit_per_user?: number | null; }>; /** @@ -603,6 +624,10 @@ export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThr * First message in the forum thread */ message: RESTPostAPIChannelMessageJSONBody; + /** + * The IDs of the set of tags that have been applied to a thread in a forum channel + */ + applied_tags?: Snowflake[]; }; /** diff --git a/deno/rest/v9/guild.ts b/deno/rest/v9/guild.ts index a1af70c02..25b393f1a 100644 --- a/deno/rest/v9/guild.ts +++ b/deno/rest/v9/guild.ts @@ -53,6 +53,8 @@ export type APIGuildCreatePartialChannel = StrictPartial< | 'rtc_region' | 'video_quality_mode' | 'flags' + | 'default_reaction_emoji' + | 'available_tags' > > & AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{ diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index c9e38afe3..35cf36963 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -108,7 +108,7 @@ export interface APIGuildTextChannel */ default_auto_archive_duration?: ThreadAutoArchiveDuration; /** - * The channel topic (0-1024 characters) + * The channel topic (0-4096 characters for forum channels, 0-1024 characters for all others) */ topic?: string | null; /** @@ -230,9 +230,67 @@ export interface APIThreadChannel * Similar to `message_count` on message creation, but won't decrement when a message is deleted */ total_message_sent?: number; + /** + * The IDs of the set of tags that have been applied to a thread in a forum channel + */ + applied_tags: Snowflake[]; } -export type APIGuildForumChannel = APIGuildTextChannel; +/** + * https://discord.com/developers/docs/resources/channel#forum-tag-object-forum-tag-structure + */ +export interface APIGuildForumTag { + /** + * The id of the tag + */ + id: Snowflake; + /** + * The name of the tag (0-20 characters) + */ + name: string; + /** + * Whether this tag can only be added to or removed from threads by a member with the `MANAGE_THREADS` permission + */ + moderated: boolean; + /** + * The id of a guild's custom emoji + */ + emoji_id: Snowflake | null; + /** + * The unicode character of the emoji + */ + emoji_name: string | null; +} + +/** + * https://discord.com/developers/docs/resources/channel#default-reaction-object-default-reaction-structure + */ +export interface APIGuildForumDefaultReactionEmoji { + /** + * The id of a guild's custom emoji + */ + emoji_id: Snowflake | null; + /** + * The unicode character of the emoji + */ + emoji_name: string | null; +} + +export interface APIGuildForumChannel extends APIGuildTextChannel { + /** + * The set of tags that can be used in a forum channel + */ + available_tags: APIGuildForumTag[]; + /** + * 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 + */ + default_thread_rate_limit_per_user?: number; + /** + * The emoji to show in the add reaction button on a thread in a forum channel + */ + default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null; +} /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure @@ -1429,7 +1487,15 @@ export interface APITextInputComponent extends APIBaseComponent; +/** + * https://discord.com/developers/docs/resources/channel#forum-tag-object-forum-tag-structure + */ +export interface APIGuildForumTag { + /** + * The id of the tag + */ + id: Snowflake; + /** + * The name of the tag (0-20 characters) + */ + name: string; + /** + * Whether this tag can only be added to or removed from threads by a member with the `MANAGE_THREADS` permission + */ + moderated: boolean; + /** + * The id of a guild's custom emoji + */ + emoji_id: Snowflake | null; + /** + * The unicode character of the emoji + */ + emoji_name: string | null; +} + +/** + * https://discord.com/developers/docs/resources/channel#default-reaction-object-default-reaction-structure + */ +export interface APIGuildForumDefaultReactionEmoji { + /** + * The id of a guild's custom emoji + */ + emoji_id: Snowflake | null; + /** + * The unicode character of the emoji + */ + emoji_name: string | null; +} + +export interface APIGuildForumChannel extends APIGuildTextChannel { + /** + * The set of tags that can be used in a forum channel + */ + available_tags: APIGuildForumTag[]; + /** + * 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 + */ + default_thread_rate_limit_per_user?: number; + /** + * The emoji to show in the add reaction button on a thread in a forum channel + */ + default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null; +} /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure @@ -1428,7 +1486,15 @@ export interface APITextInputComponent extends APIBaseComponent; /** @@ -589,6 +610,10 @@ export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThr * First message in the forum thread */ message: RESTPostAPIChannelMessageJSONBody; + /** + * The IDs of the set of tags that have been applied to a thread in a forum channel + */ + applied_tags?: Snowflake[]; }; /** diff --git a/rest/v10/guild.ts b/rest/v10/guild.ts index e2fa6fdd9..1b7af3c52 100644 --- a/rest/v10/guild.ts +++ b/rest/v10/guild.ts @@ -53,6 +53,8 @@ export type APIGuildCreatePartialChannel = StrictPartial< | 'rtc_region' | 'video_quality_mode' | 'flags' + | 'default_reaction_emoji' + | 'available_tags' > > & AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{ diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index 7cd30f1a1..ed428aa3d 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -19,6 +19,8 @@ import type { OverwriteType, ThreadAutoArchiveDuration, VideoQualityMode, + APIGuildForumTag, + APIGuildForumDefaultReactionEmoji, } from '../../payloads/v9/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals'; @@ -56,15 +58,15 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert */ position?: number | null; /** - * 0-1024 character channel topic + * 0-1024 character channel topic (0-4096 characters for forum channels) * - * Channel types: text, news + * Channel types: text, news, forum */ topic?: string | null; /** * Whether the channel is nsfw * - * Channel types: text, voice, news + * Channel types: text, voice, news, forum */ nsfw?: boolean | null; /** @@ -72,7 +74,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, * are unaffected * - * Channel types: text, newsThread, publicThread, privateThread + * Channel types: text, newsThread, publicThread, privateThread, forum */ rate_limit_per_user?: number | null; /** @@ -141,6 +143,25 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert * Channel types: privateThread */ invitable?: boolean; + /** + * The set of tags that can be used in a forum channel + * + * Channel types: forum + */ + available_tags?: APIGuildForumTag[]; + /** + * The emoji to show in the add reaction button on a thread in a forum channel + * + * Channel types: forum + */ + default_reaction_emoji?: APIGuildForumDefaultReactionEmoji; + /** + * 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: text, forum + */ + default_thread_rate_limit_per_user?: number | null; }>; /** @@ -603,6 +624,10 @@ export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThr * First message in the forum thread */ message: RESTPostAPIChannelMessageJSONBody; + /** + * The IDs of the set of tags that have been applied to a thread in a forum channel + */ + applied_tags?: Snowflake[]; }; /** diff --git a/rest/v9/guild.ts b/rest/v9/guild.ts index 2666ac45d..88c23ca2c 100644 --- a/rest/v9/guild.ts +++ b/rest/v9/guild.ts @@ -53,6 +53,8 @@ export type APIGuildCreatePartialChannel = StrictPartial< | 'rtc_region' | 'video_quality_mode' | 'flags' + | 'default_reaction_emoji' + | 'available_tags' > > & AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{