Carbon
CoreClasses

BaseChannel

Extends

  • Base

Extended by

Type Parameters

Type ParameterDefault type
Type extends ChannelType-
IsPartial extends booleanfalse

Constructors

new BaseChannel()

new BaseChannel<Type, IsPartial>(client, rawDataOrId): BaseChannel<Type, IsPartial>

Parameters

ParameterType
clientClient
rawDataOrIdIsPartial extends true ? string : Extract<APIDMChannel, object> | Extract<APIGroupDMChannel, object> | Extract<APIGuildCategoryChannel, object> | Extract<APIGuildForumChannel, object> | Extract<APIGuildMediaChannel, object> | Extract<APIGuildStageVoiceChannel, object> | Extract<APIGuildVoiceChannel, object> | Extract<APINewsChannel, object> | Extract<APITextChannel, object> | Extract<APIThreadChannel, object>

Returns

BaseChannel<Type, IsPartial>

Overrides

Base.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited from
clientpublicClientundefined-Base.client
idreadonlystringundefinedThe id of the channel.-
rawDataprotectednull | Extract<APIDMChannel, object> | Extract<APIGroupDMChannel, object> | Extract<APIGuildCategoryChannel, object> | Extract<APIGuildForumChannel, object> | Extract<APIGuildMediaChannel, object> | Extract<APIGuildStageVoiceChannel, object> | Extract<APIGuildVoiceChannel, object> | Extract<APINewsChannel, object> | Extract<APITextChannel, object> | Extract<APIThreadChannel, object>nullThe raw data of the channel.-

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>


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


type

get type(): IfPartial<IsPartial, Type>

The type of the channel.

Returns

IfPartial<IsPartial, Type>

Methods

fetch()

fetch(): Promise<void>

Fetches the channel from the API.

Returns

Promise<void>

The channel data.


setData()

protected setData(data): void

Parameters

ParameterType
dataExtract<APIDMChannel, object> | Extract<APIGroupDMChannel, object> | Extract<APIGuildCategoryChannel, object> | Extract<APIGuildForumChannel, object> | Extract<APIGuildMediaChannel, object> | Extract<APIGuildStageVoiceChannel, object> | Extract<APIGuildVoiceChannel, object> | Extract<APINewsChannel, object> | Extract<APITextChannel, object> | Extract<APIThreadChannel, object>

Returns

void


setField()

protected setField(field, value): void

Parameters

ParameterType
fieldkeyof Extract<APIDMChannel, object> & keyof Extract<APIGroupDMChannel, object> & keyof Extract<APIGuildCategoryChannel, object> & keyof Extract<APIGuildForumChannel, object> & keyof Extract<APIGuildMediaChannel, object> & keyof Extract<APIGuildStageVoiceChannel, object> & keyof Extract<APIGuildVoiceChannel, object> & keyof Extract<APINewsChannel, object> & keyof Extract<APITextChannel, object> & keyof Extract<APIThreadChannel, object>
valueunknown

Returns

void

On this page

Edit on GitHub