Carbon
CoreClasses

GuildCategoryChannel

Represents a guild category channel.

Extends

Type Parameters

Type ParameterDefault type
IsPartial extends booleanfalse

Constructors

new GuildCategoryChannel()

new GuildCategoryChannel<IsPartial>(client, rawDataOrId): GuildCategoryChannel<IsPartial>

Parameters

ParameterType
clientClient
rawDataOrIdIsPartial extends true ? string : APIGuildCategoryChannel

Returns

GuildCategoryChannel<IsPartial>

Inherited from

BaseGuildChannel.constructor

Properties

PropertyModifierTypeDescriptionOverridesInherited from
clientpublicClient--BaseGuildChannel.client
idreadonlystringThe id of the channel.-BaseGuildChannel.id
rawDatapublicnull | APIGuildCategoryChannelThe raw data of the channel.BaseGuildChannel.rawData-

Accessors

flags

get flags(): IfPartial<IsPartial, undefined | ChannelFlags>

The flags of the channel in a bitfield.

See

https://discord.com/developers/docs/resources/channel#channel-object-channel-flags

Returns

IfPartial<IsPartial, undefined | ChannelFlags>

Inherited from

BaseGuildChannel.flags


guild

get guild(): IfPartial<IsPartial, Guild<true>>

The guild this channel is in

Returns

IfPartial<IsPartial, Guild<true>>

Inherited from

BaseGuildChannel.guild


guildId

get guildId(): IfPartial<IsPartial, string>

The ID of the guild this channel is in

Returns

IfPartial<IsPartial, string>

Inherited from

BaseGuildChannel.guildId


name

get name(): IfPartial<IsPartial, string>

The name of the channel.

Returns

IfPartial<IsPartial, string>

Inherited from

BaseGuildChannel.name


nsfw

get nsfw(): IfPartial<IsPartial, boolean>

Whether the channel is marked as nsfw.

Returns

IfPartial<IsPartial, boolean>

Inherited from

BaseGuildChannel.nsfw


parentId

get parentId(): IfPartial<IsPartial, null | string>

The ID of the parent category for the channel.

Returns

IfPartial<IsPartial, null | string>

Inherited from

BaseGuildChannel.parentId


partial

get partial(): IsPartial

Whether the channel is a partial channel (meaning it does not have all the data). If this is true, you should use BaseChannel.fetch to get the full data of the channel.

Returns

IsPartial

Inherited from

BaseGuildChannel.partial


position

get position(): IfPartial<IsPartial, number>

The position of the channel in the channel list.

Returns

IfPartial<IsPartial, number>

Inherited from

BaseGuildChannel.position


type

get type(): IfPartial<IsPartial, Type>

The type of the channel.

Returns

IfPartial<IsPartial, Type>

Inherited from

BaseGuildChannel.type

Methods

createInvite()

createInvite(options?): Promise<APIExtendedInvite>

Create an invite for the channel

Parameters

ParameterType
options?RESTPostAPIChannelInviteJSONBody

Returns

Promise<APIExtendedInvite>

Inherited from

BaseGuildChannel.createInvite


fetch()

fetch(): Promise<void>

Fetches the channel from the API.

Returns

Promise<void>

The channel data.

Inherited from

BaseGuildChannel.fetch


getInvites()

getInvites(): Promise<RESTGetAPIGuildInvitesResult>

Get the invites for the channel

Returns

Promise<RESTGetAPIGuildInvitesResult>

Inherited from

BaseGuildChannel.getInvites


send()

send(): Promise<void>

You cannot send a message to a category channel, so this method throws an error

Returns

Promise<void>

Overrides

BaseGuildChannel.send


setData()

protected setData(data): void

Parameters

ParameterType
dataAPIGuildCategoryChannel

Returns

void

Inherited from

BaseGuildChannel.setData


setField()

protected setField(field, value): void

Parameters

ParameterType
field"id" | "name" | "type" | "flags" | "guild_id" | "permission_overwrites" | "position" | "parent_id" | "nsfw"
valueunknown

Returns

void

Inherited from

BaseGuildChannel.setField


setName()

setName(name): Promise<void>

Set the name of the channel

Parameters

ParameterTypeDescription
namestringThe new name of the channel

Returns

Promise<void>

Inherited from

BaseGuildChannel.setName


setNsfw()

setNsfw(nsfw): Promise<void>

Set whether the channel is nsfw

Parameters

ParameterTypeDescription
nsfwbooleanThe new nsfw status of the channel

Returns

Promise<void>

Inherited from

BaseGuildChannel.setNsfw


setParent()

setParent(parent): Promise<void>

Set the parent ID of the channel

Parameters

ParameterTypeDescription
parentstring | GuildCategoryChannel<false>The new category channel or ID to set

Returns

Promise<void>

Inherited from

BaseGuildChannel.setParent


setPosition()

setPosition(position): Promise<void>

Set the position of the channel

Parameters

ParameterTypeDescription
positionnumberThe new position of the channel

Returns

Promise<void>

Inherited from

BaseGuildChannel.setPosition


triggerTyping()

triggerTyping(): Promise<void>

Trigger a typing indicator in the channel (this will expire after 10 seconds)

Returns

Promise<void>

Inherited from

BaseGuildChannel.triggerTyping

On this page

Edit on GitHub