GuildCategoryChannel
Represents a guild category channel.
Extends
BaseGuildChannel
<ChannelType.GuildCategory
,IsPartial
>
Type Parameters
Type Parameter | Default type |
---|---|
IsPartial extends boolean | false |
Constructors
Constructor
new GuildCategoryChannel<
IsPartial
>(client
,rawDataOrId
):GuildCategoryChannel
<IsPartial
>
Parameters
Parameter | Type |
---|---|
client | Client |
rawDataOrId | IsPartial extends true ? string : APIGuildCategoryChannel |
Returns
GuildCategoryChannel
<IsPartial
>
Inherited from
Properties
Property | Modifier | Type | Description | Overrides | Inherited from |
---|---|---|---|---|---|
client | public | Client | - | - | BaseGuildChannel .client |
id | readonly | string | The id of the channel. | - | BaseGuildChannel .id |
rawData | public | null | APIGuildCategoryChannel | The raw data of the channel. | BaseGuildChannel .rawData | - |
Accessors
flags
Get Signature
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
guild
Get Signature
The guild this channel is in
Returns
IfPartial
<IsPartial
, Guild
<true
>>
Inherited from
guildId
Get Signature
get guildId():
IfPartial
<IsPartial
,string
>
The ID of the guild this channel is in
Returns
IfPartial
<IsPartial
, string
>
Inherited from
name
Get Signature
get name():
IfPartial
<IsPartial
,string
>
The name of the channel.
Returns
IfPartial
<IsPartial
, string
>
Inherited from
nsfw
Get Signature
get nsfw():
IfPartial
<IsPartial
,boolean
>
Whether the channel is marked as nsfw.
Returns
IfPartial
<IsPartial
, boolean
>
Inherited from
parentId
Get Signature
get parentId():
IfPartial
<IsPartial
,null
|string
>
The ID of the parent category for the channel.
Returns
IfPartial
<IsPartial
, null
| string
>
Inherited from
partial
Get Signature
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
position
Get Signature
get position():
IfPartial
<IsPartial
,number
>
The position of the channel in the channel list.
Returns
IfPartial
<IsPartial
, number
>
Inherited from
type
Get Signature
get type():
IfPartial
<IsPartial
,Type
>
The type of the channel.
Returns
IfPartial
<IsPartial
, Type
>
Inherited from
Methods
createInvite()
createInvite(
options?
):Promise
<APIExtendedInvite
>
Create an invite for the channel
Parameters
Parameter | Type |
---|---|
options? | RESTPostAPIChannelInviteJSONBody |
Returns
Promise
<APIExtendedInvite
>
Inherited from
fetch()
fetch():
Promise
<BaseChannel
<GuildCategory
,false
>>
Fetches the channel from the API.
Returns
Promise
<BaseChannel
<GuildCategory
, false
>>
A Promise that resolves to a non-partial channel
Inherited from
getInvites()
getInvites():
Promise
<RESTGetAPIGuildInvitesResult
>
Get the invites for the channel
Returns
Promise
<RESTGetAPIGuildInvitesResult
>
Inherited from
send()
send():
Promise
<void
>
You cannot send a message to a category channel, so this method throws an error
Returns
Promise
<void
>
Overrides
setData()
protected
setData(data
):void
Parameters
Parameter | Type |
---|---|
data | APIGuildCategoryChannel |
Returns
void
Inherited from
setField()
protected
setField(field
,value
):void
Parameters
Parameter | Type |
---|---|
field | "guild_id" | "id" | "type" | "name" | "nsfw" | "flags" | "permission_overwrites" | "position" | "parent_id" |
value | unknown |
Returns
void
Inherited from
setName()
setName(
name
):Promise
<void
>
Set the name of the channel
Parameters
Parameter | Type | Description |
---|---|---|
name | string | The new name of the channel |
Returns
Promise
<void
>
Inherited from
setNsfw()
setNsfw(
nsfw
):Promise
<void
>
Set whether the channel is nsfw
Parameters
Parameter | Type | Description |
---|---|---|
nsfw | boolean | The new nsfw status of the channel |
Returns
Promise
<void
>
Inherited from
setParent()
setParent(
parent
):Promise
<void
>
Set the parent ID of the channel
Parameters
Parameter | Type | Description |
---|---|---|
parent | string | GuildCategoryChannel <false > | The new category channel or ID to set |
Returns
Promise
<void
>
Inherited from
setPosition()
setPosition(
position
):Promise
<void
>
Set the position of the channel
Parameters
Parameter | Type | Description |
---|---|---|
position | number | The new position of the channel |
Returns
Promise
<void
>
Inherited from
triggerTyping()
triggerTyping():
Promise
<void
>
Trigger a typing indicator in the channel (this will expire after 10 seconds)
Returns
Promise
<void
>