Skip to content

Commit 18cf4a5

Browse files
authored
fix: Narrow thread-related properties for channels (#1377)
1 parent 7a07478 commit 18cf4a5

File tree

4 files changed

+36
-28
lines changed

4 files changed

+36
-28
lines changed

deno/payloads/v10/channel.ts

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deno/payloads/v9/channel.ts

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

payloads/v10/channel.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T
127127
permission_overwrites?: APIOverwrite[];
128128
/**
129129
* ID of the parent category for a channel (each parent category can contain up to 50 channels)
130-
*
131-
* OR
132-
*
133-
* ID of the parent channel for a thread
134130
*/
135131
parent_id?: Snowflake | null;
136132
/**
@@ -163,7 +159,9 @@ export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelT
163159

164160
export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
165161
export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildAnnouncement>;
166-
export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.GuildCategory>, APISortableChannel {}
162+
export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.GuildCategory>, APISortableChannel {
163+
parent_id?: null;
164+
}
167165

168166
export interface APIVoiceChannelBase<T extends ChannelType>
169167
extends APIGuildChannel<T>,
@@ -274,9 +272,9 @@ export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannel
274272
*/
275273
total_message_sent?: number;
276274
/**
277-
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
275+
* ID of the parent channel for the thread
278276
*/
279-
applied_tags: Snowflake[];
277+
parent_id?: Snowflake;
280278
}
281279

282280
export type APIPublicThreadChannel = APIThreadChannel<ChannelType.PublicThread>;
@@ -399,6 +397,10 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
399397
* The default sort order type used to order posts in a thread-only channel
400398
*/
401399
default_sort_order: SortOrderType | null;
400+
/**
401+
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
402+
*/
403+
applied_tags: Snowflake[];
402404
}
403405

404406
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {

payloads/v9/channel.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T
127127
permission_overwrites?: APIOverwrite[];
128128
/**
129129
* ID of the parent category for a channel (each parent category can contain up to 50 channels)
130-
*
131-
* OR
132-
*
133-
* ID of the parent channel for a thread
134130
*/
135131
parent_id?: Snowflake | null;
136132
/**
@@ -163,7 +159,9 @@ export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelT
163159

164160
export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
165161
export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildAnnouncement>;
166-
export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.GuildCategory>, APISortableChannel {}
162+
export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.GuildCategory>, APISortableChannel {
163+
parent_id?: null;
164+
}
167165

168166
export interface APIVoiceChannelBase<T extends ChannelType>
169167
extends APIGuildChannel<T>,
@@ -274,9 +272,9 @@ export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannel
274272
*/
275273
total_message_sent?: number;
276274
/**
277-
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
275+
* ID of the parent channel for the thread
278276
*/
279-
applied_tags: Snowflake[];
277+
parent_id?: Snowflake;
280278
}
281279

282280
export type APIPublicThreadChannel = APIThreadChannel<ChannelType.PublicThread>;
@@ -399,6 +397,10 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
399397
* The default sort order type used to order posts in a thread-only channel
400398
*/
401399
default_sort_order: SortOrderType | null;
400+
/**
401+
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
402+
*/
403+
applied_tags: Snowflake[];
402404
}
403405

404406
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {

0 commit comments

Comments
 (0)