/** @module CategoryChannel */ import PermissionOverwrite from "./PermissionOverwrite"; import GuildChannel from "./GuildChannel"; import type Member from "./Member"; import Permission from "./Permission"; import type Client from "../Client"; import { type ChannelTypes } from "../Constants"; import TypedCollection from "../util/TypedCollection"; import type { EditAnyGuildChannelOptions, EditPermissionOptions, RawCategoryChannel, RawGuildChannel, RawOverwrite } from "../types/channels"; import type { JSONCategoryChannel } from "../types/json"; /** Represents a guild category channel. */ export default class CategoryChannel extends GuildChannel { /** The channels in this category. */ channels: TypedCollection; /** The permission overwrites of this channel. */ permissionOverwrites: TypedCollection; /** The position of this channel on the sidebar. */ position: number; type: ChannelTypes.GUILD_CATEGORY; constructor(data: RawCategoryChannel, client: Client); protected update(data: Partial): void; /** * Delete a permission overwrite on this channel. * @param overwriteID The ID of the permission overwrite to delete. * @param reason The reason for deleting the permission overwrite. */ deletePermission(overwriteID: string, reason?: string): Promise; /** * Edit this channel. * @param options The options for editing the channel. */ edit(options: EditAnyGuildChannelOptions): Promise; /** * Edit a permission overwrite on this channel. * @param overwriteID The ID of the permission overwrite to edit. * @param options The options for editing the permission overwrite. */ editPermission(overwriteID: string, options: EditPermissionOptions): Promise; /** * Get the permissions of a member. If providing an id, the member must be cached. * @param member The member to get the permissions of. */ permissionsOf(member: string | Member): Permission; toJSON(): JSONCategoryChannel; }