From 64494137da4da180e51973b5773f89f7d5280566 Mon Sep 17 00:00:00 2001 From: Danial Raza Date: Wed, 12 Feb 2025 12:26:13 +0100 Subject: [PATCH] types: rename `CategoryChannelType` to `CategoryChannelChildTypes` (#10750) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/discord.js/typings/index.d.ts | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 91f1f4b88..39a30b453 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -904,16 +904,13 @@ export interface MappedChannelCategoryTypes { [ChannelType.GuildMedia]: MediaChannel; } -export type CategoryChannelType = Exclude< - ChannelType, - | ChannelType.DM - | ChannelType.GroupDM - | ChannelType.PublicThread - | ChannelType.AnnouncementThread - | ChannelType.PrivateThread - | ChannelType.GuildCategory - | ChannelType.GuildDirectory ->; +export type CategoryChannelChildTypes = + | ChannelType.GuildAnnouncement + | ChannelType.GuildVoice + | ChannelType.GuildText + | ChannelType.GuildStageVoice + | ChannelType.GuildForum + | ChannelType.GuildMedia; export class CategoryChannel extends GuildChannel { public get children(): CategoryChannelChildManager; @@ -4010,7 +4007,7 @@ export class CategoryChannelChildManager extends DataManager( + public create( options: CategoryCreateChannelOptions & { type: Type }, ): Promise; public create(options: CategoryCreateChannelOptions): Promise; @@ -4108,7 +4105,7 @@ export type MappedGuildChannelTypes = { [ChannelType.GuildCategory]: CategoryChannel; } & MappedChannelCategoryTypes; -export type GuildChannelTypes = CategoryChannelType | ChannelType.GuildCategory; +export type GuildChannelTypes = CategoryChannelChildTypes | ChannelType.GuildCategory; export class GuildChannelManager extends CachedManager { private constructor(guild: Guild, iterable?: Iterable); @@ -5028,7 +5025,7 @@ export interface CategoryCreateChannelOptions { name: string; permissionOverwrites?: readonly OverwriteResolvable[] | ReadonlyCollection; topic?: string; - type?: CategoryChannelType; + type?: CategoryChannelChildTypes; nsfw?: boolean; bitrate?: number; userLimit?: number;