diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index a00da007a..a4d5ee2bf 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -37,6 +37,7 @@ export interface APIPartialChannel { */ export interface APIChannelBase extends APIPartialChannel { type: T; + flags?: ChannelFlags; } // TODO: update when text in voice is released @@ -47,7 +48,8 @@ export type TextChannelType = | ChannelType.GuildPublicThread | ChannelType.GuildPrivateThread | ChannelType.GuildNewsThread - | ChannelType.GuildText; + | ChannelType.GuildText + | ChannelType.GuildForum; export type GuildChannelType = Exclude< TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews, @@ -223,6 +225,8 @@ export interface APIThreadChannel last_message_id?: Snowflake | null; } +export type APIGuildForumChannel = APIGuildTextChannel; + /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */ @@ -234,7 +238,8 @@ export type APIChannel = | APIVoiceChannel | APIGuildCategoryChannel | APIThreadChannel - | APINewsChannel; + | APINewsChannel + | APIGuildForumChannel; /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-types @@ -292,6 +297,10 @@ export enum ChannelType { * See https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ */ GuildDirectory, + /** + * A channel that can only contain threads + */ + GuildForum, } export enum VideoQualityMode { @@ -1358,6 +1367,13 @@ export interface APITextInputComponent extends APIBaseComponent extends APIPartialChannel { type: T; + flags?: ChannelFlags; } // TODO: update when text in voice is released @@ -47,7 +48,8 @@ export type TextChannelType = | ChannelType.GuildPublicThread | ChannelType.GuildPrivateThread | ChannelType.GuildNewsThread - | ChannelType.GuildText; + | ChannelType.GuildText + | ChannelType.GuildForum; export type GuildChannelType = Exclude< TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews, @@ -223,6 +225,8 @@ export interface APIThreadChannel last_message_id?: Snowflake | null; } +export type APIGuildForumChannel = APIGuildTextChannel; + /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */ @@ -234,7 +238,8 @@ export type APIChannel = | APIVoiceChannel | APIGuildCategoryChannel | APIThreadChannel - | APINewsChannel; + | APINewsChannel + | APIGuildForumChannel; /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-types @@ -292,6 +297,10 @@ export enum ChannelType { * See https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ */ GuildDirectory, + /** + * A channel that can only contain threads + */ + GuildForum, } export enum VideoQualityMode { @@ -1358,6 +1367,13 @@ export interface APITextInputComponent extends APIBaseComponent; +/** + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + */ +export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & + RESTPostAPIChannelMessageJSONBody; + +/** + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + */ +export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessageFormDataBody; + /** * https://discord.com/developers/docs/resources/channel#start-thread-with-message */ diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index 9d6a281b2..e8b62049b 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -595,6 +595,17 @@ export type RESTPostAPIChannelMessagesThreadsJSONBody = AddUndefinedToPossiblyUn rate_limit_per_user?: number; }>; +/** + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + */ +export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & + RESTPostAPIChannelMessageJSONBody; + +/** + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + */ +export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessageFormDataBody; + /** * https://discord.com/developers/docs/resources/channel#start-thread-with-message */ diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index 4a31cc996..6e046a66f 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -37,6 +37,7 @@ export interface APIPartialChannel { */ export interface APIChannelBase extends APIPartialChannel { type: T; + flags?: ChannelFlags; } // TODO: update when text in voice is released @@ -47,7 +48,8 @@ export type TextChannelType = | ChannelType.GuildPublicThread | ChannelType.GuildPrivateThread | ChannelType.GuildNewsThread - | ChannelType.GuildText; + | ChannelType.GuildText + | ChannelType.GuildForum; export type GuildChannelType = Exclude< TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews, @@ -223,6 +225,8 @@ export interface APIThreadChannel last_message_id?: Snowflake | null; } +export type APIGuildForumChannel = APIGuildTextChannel; + /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */ @@ -234,7 +238,8 @@ export type APIChannel = | APIVoiceChannel | APIGuildCategoryChannel | APIThreadChannel - | APINewsChannel; + | APINewsChannel + | APIGuildForumChannel; /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-types @@ -292,6 +297,10 @@ export enum ChannelType { * See https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ */ GuildDirectory, + /** + * A channel that can only contain threads + */ + GuildForum, } export enum VideoQualityMode { @@ -1358,6 +1367,13 @@ export interface APITextInputComponent extends APIBaseComponent extends APIPartialChannel { type: T; + flags?: ChannelFlags; } // TODO: update when text in voice is released @@ -47,7 +48,8 @@ export type TextChannelType = | ChannelType.GuildPublicThread | ChannelType.GuildPrivateThread | ChannelType.GuildNewsThread - | ChannelType.GuildText; + | ChannelType.GuildText + | ChannelType.GuildForum; export type GuildChannelType = Exclude< TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews, @@ -223,6 +225,8 @@ export interface APIThreadChannel last_message_id?: Snowflake | null; } +export type APIGuildForumChannel = APIGuildTextChannel; + /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */ @@ -234,7 +238,8 @@ export type APIChannel = | APIVoiceChannel | APIGuildCategoryChannel | APIThreadChannel - | APINewsChannel; + | APINewsChannel + | APIGuildForumChannel; /** * https://discord.com/developers/docs/resources/channel#channel-object-channel-types @@ -292,6 +297,10 @@ export enum ChannelType { * See https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ */ GuildDirectory, + /** + * A channel that can only contain threads + */ + GuildForum, } export enum VideoQualityMode { @@ -1358,6 +1367,13 @@ export interface APITextInputComponent extends APIBaseComponent; +/** + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + */ +export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & + RESTPostAPIChannelMessageJSONBody; + +/** + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + */ +export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessageFormDataBody; + /** * https://discord.com/developers/docs/resources/channel#start-thread-with-message */ diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index 90bc1ee82..cd1add4be 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -595,6 +595,17 @@ export type RESTPostAPIChannelMessagesThreadsJSONBody = AddUndefinedToPossiblyUn rate_limit_per_user?: number; }>; +/** + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + */ +export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & + RESTPostAPIChannelMessageJSONBody; + +/** + * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel + */ +export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessageFormDataBody; + /** * https://discord.com/developers/docs/resources/channel#start-thread-with-message */