mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
types: rename CategoryChannelType to CategoryChannelChildTypes (#10750)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
23
packages/discord.js/typings/index.d.ts
vendored
23
packages/discord.js/typings/index.d.ts
vendored
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user