types: rename CategoryChannelType to CategoryChannelChildTypes (#10750)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Danial Raza
2025-02-12 12:26:13 +01:00
committed by GitHub
parent 58a111d6fe
commit 64494137da

View File

@@ -904,16 +904,13 @@ export interface MappedChannelCategoryTypes {
[ChannelType.GuildMedia]: MediaChannel; [ChannelType.GuildMedia]: MediaChannel;
} }
export type CategoryChannelType = Exclude< export type CategoryChannelChildTypes =
ChannelType, | ChannelType.GuildAnnouncement
| ChannelType.DM | ChannelType.GuildVoice
| ChannelType.GroupDM | ChannelType.GuildText
| ChannelType.PublicThread | ChannelType.GuildStageVoice
| ChannelType.AnnouncementThread | ChannelType.GuildForum
| ChannelType.PrivateThread | ChannelType.GuildMedia;
| ChannelType.GuildCategory
| ChannelType.GuildDirectory
>;
export class CategoryChannel extends GuildChannel { export class CategoryChannel extends GuildChannel {
public get children(): CategoryChannelChildManager; public get children(): CategoryChannelChildManager;
@@ -4010,7 +4007,7 @@ export class CategoryChannelChildManager extends DataManager<Snowflake, Category
public channel: CategoryChannel; public channel: CategoryChannel;
public get guild(): Guild; public get guild(): Guild;
public create<Type extends CategoryChannelType>( public create<Type extends CategoryChannelChildTypes>(
options: CategoryCreateChannelOptions & { type: Type }, options: CategoryCreateChannelOptions & { type: Type },
): Promise<MappedChannelCategoryTypes[Type]>; ): Promise<MappedChannelCategoryTypes[Type]>;
public create(options: CategoryCreateChannelOptions): Promise<TextChannel>; public create(options: CategoryCreateChannelOptions): Promise<TextChannel>;
@@ -4108,7 +4105,7 @@ export type MappedGuildChannelTypes = {
[ChannelType.GuildCategory]: CategoryChannel; [ChannelType.GuildCategory]: CategoryChannel;
} & MappedChannelCategoryTypes; } & MappedChannelCategoryTypes;
export type GuildChannelTypes = CategoryChannelType | ChannelType.GuildCategory; export type GuildChannelTypes = CategoryChannelChildTypes | ChannelType.GuildCategory;
export class GuildChannelManager extends CachedManager<Snowflake, GuildBasedChannel, GuildChannelResolvable> { export class GuildChannelManager extends CachedManager<Snowflake, GuildBasedChannel, GuildChannelResolvable> {
private constructor(guild: Guild, iterable?: Iterable<RawGuildChannelData>); private constructor(guild: Guild, iterable?: Iterable<RawGuildChannelData>);
@@ -5028,7 +5025,7 @@ export interface CategoryCreateChannelOptions {
name: string; name: string;
permissionOverwrites?: readonly OverwriteResolvable[] | ReadonlyCollection<Snowflake, OverwriteResolvable>; permissionOverwrites?: readonly OverwriteResolvable[] | ReadonlyCollection<Snowflake, OverwriteResolvable>;
topic?: string; topic?: string;
type?: CategoryChannelType; type?: CategoryChannelChildTypes;
nsfw?: boolean; nsfw?: boolean;
bitrate?: number; bitrate?: number;
userLimit?: number; userLimit?: number;