Skip to content

StageChannel

Defined in: packages/structures/src/channels.ts:51

A guild stage channel.

new StageChannel(data, context?): StageChannel

Defined in: packages/structures/src/channels.ts:41

APIChannel

ResourceContext

StageChannel

VoiceChannel.constructor

bitrate: number

Defined in: packages/structures/src/channels.ts:33

Bitrate in bits per second.

VoiceChannel.bitrate


optional guildId?: string

Defined in: packages/structures/src/base.ts:236

VoiceChannel.guildId


readonly id: string

Defined in: packages/structures/src/base.ts:12

VoiceChannel.id


optional name?: string | null

Defined in: packages/structures/src/base.ts:235

VoiceChannel.name


optional nsfw?: boolean

Defined in: packages/structures/src/base.ts:239

VoiceChannel.nsfw


optional parentId?: string | null

Defined in: packages/structures/src/base.ts:238

VoiceChannel.parentId


partial: boolean

Defined in: packages/structures/src/base.ts:249

A placeholder built from a message’s channel_id, not from channel data: its type, name, parentId and permissionOverwrites are not the real channel’s, so nothing may decide access from them.

VoiceChannel.partial


permissionOverwrites: APIOverwrite[]

Defined in: packages/structures/src/base.ts:243

Role and member permission overwrites (empty for DMs and when not provided).

VoiceChannel.permissionOverwrites


optional position?: number

Defined in: packages/structures/src/base.ts:241

VoiceChannel.position


optional rateLimitPerUser?: number

Defined in: packages/structures/src/base.ts:240

VoiceChannel.rateLimitPerUser


rtcRegion: string | null

Defined in: packages/structures/src/channels.ts:37

Voice region override, or null for automatic.

VoiceChannel.rtcRegion


optional topic?: string | null

Defined in: packages/structures/src/base.ts:237

VoiceChannel.topic


type: number

Defined in: packages/structures/src/base.ts:234

VoiceChannel.type


userLimit: number

Defined in: packages/structures/src/channels.ts:35

User limit (0 = unlimited).

VoiceChannel.userLimit


videoQualityMode: number

Defined in: packages/structures/src/channels.ts:39

Camera video quality mode.

VoiceChannel.videoQualityMode

get createdAt(): Date

Defined in: packages/structures/src/base.ts:29

Returns the timestamp this snowflake was created at.

Date

VoiceChannel.createdAt


get createdTimestamp(): number

Defined in: packages/structures/src/base.ts:25

Milliseconds since the Unix epoch at which this snowflake was created.

number

VoiceChannel.createdTimestamp


get kind(): "text" | "dm" | "voice" | "group-dm" | "category" | "announcement" | "thread" | "stage" | "directory" | "forum" | "media" | "unknown"

Defined in: packages/structures/src/base.ts:345

What kind of channel this is: "text", "voice", "thread", "forum"… ("unknown" for a type this version does not know).

"text" | "dm" | "voice" | "group-dm" | "category" | "announcement" | "thread" | "stage" | "directory" | "forum" | "media" | "unknown"

VoiceChannel.kind

as<K>(…kinds): ChannelOfKind<K>

Defined in: packages/structures/src/base.ts:363

Returns this channel typed as one of kinds.

K extends "text" | "dm" | "voice" | "group-dm" | "category" | "announcement" | "thread" | "stage" | "directory" | "forum" | "media" | "unknown"

…K[]

ChannelOfKind<K>

If it is a different kind.

VoiceChannel.as


delete(reason?): Promise<void>

Defined in: packages/structures/src/base.ts:333

Deletes this channel.

string

Audit-log reason.

Promise<void>

A promise fulfilled when Discord confirms deletion.

If the channel is not attached to a client.

VoiceChannel.delete


edit(options): Promise<Channel>

Defined in: packages/structures/src/base.ts:288

Edits this channel.

Record<string, unknown>

Channel fields to change.

Promise<Channel>

The updated channel.

If the channel is not attached to a client.

VoiceChannel.edit


editName(name): Promise<Channel>

Defined in: packages/structures/src/base.ts:295

Changes only this channel’s name.

string

New channel name.

Promise<Channel>

The updated channel.

If the name is empty.

If the channel is not attached to a client.

VoiceChannel.editName


editParent(parentId): Promise<Channel>

Defined in: packages/structures/src/base.ts:328

string | null

Promise<Channel>

VoiceChannel.editParent


editPermissionOverwrite(targetId, changes, options?): Promise<void>

Defined in: packages/structures/src/base.ts:313

Changes some permissions of one overwrite and keeps the rest: true allows, false denies, null resets to inherited.

string

Role or member ID.

PermissionOverwriteChanges

Permissions to change.

type (0 role, 1 member) when the overwrite does not exist yet; audit-log reason.

string

0 | 1

Promise<void>

channel.editPermissionOverwrite(userId, { ViewChannel: true, SendMessages: false }, { type: 1 })

VoiceChannel.editPermissionOverwrite


editTopic(topic): Promise<Channel>

Defined in: packages/structures/src/base.ts:301

Changes only this channel’s topic.

string | null

New topic, or null to clear it.

Promise<Channel>

The updated channel.

If the channel is not attached to a client.

VoiceChannel.editTopic


is<K>(…kinds): this is ChannelOfKind<K>

Defined in: packages/structures/src/base.ts:353

Whether this channel is one of kinds, narrowing its type to match.

K extends "text" | "dm" | "voice" | "group-dm" | "category" | "announcement" | "thread" | "stage" | "directory" | "forum" | "media" | "unknown"

…K[]

this is ChannelOfKind<K>

if (channel.is("text", "announcement")) await channel.send({ content: "hi" });

VoiceChannel.is


isDMBased(): boolean

Defined in: packages/structures/src/base.ts:389

Whether this is a direct-message channel (DM or group DM).

boolean

VoiceChannel.isDMBased


isTextBased(): boolean

Defined in: packages/structures/src/base.ts:379

Whether messages can be sent in this channel (text, DM, announcement, voice, stage, threads).

boolean

VoiceChannel.isTextBased


isThread(): boolean

Defined in: packages/structures/src/base.ts:374

Whether this is a thread (announcement, public or private).

boolean

VoiceChannel.isThread


isVoiceBased(): boolean

Defined in: packages/structures/src/base.ts:384

Whether this is a voice or stage channel.

boolean

VoiceChannel.isVoiceBased


send(options): Promise<Message>

Defined in: packages/structures/src/base.ts:279

Sends a message to this channel.

MessageCreateOptions

Message payload.

Promise<Message>

The created message.

If the channel is not attached to a client.

VoiceChannel.send


toString(): string

Defined in: packages/structures/src/base.ts:394

Returns the Discord channel mention string. Used automatically in template literals.

string

VoiceChannel.toString


update(options): Promise<Channel>

Defined in: packages/structures/src/base.ts:340

Updates this channel using the same resource operation as edit.

Record<string, unknown>

Channel fields to change.

Promise<Channel>

The updated channel.

If the channel is not attached to a client.

VoiceChannel.update