Skip to content

Connection

Represents a connection to a Discord voice channel

Extends

  • EventEmitter

Constructors

new Connection()

new Connection(manager: Shoukaku, options: VoiceChannelOptions): Connection

Parameters

ParameterTypeDescription
managerShoukakuThe manager of this connection
optionsVoiceChannelOptionsThe options to pass in connection creation

Returns

Connection

Overrides

EventEmitter.constructor

Defined in

shoukaku/src/guild/Connection.ts:86

Properties

channelId

channelId: null | string;

VoiceChannelId of the connection that is being managed by this instance

Defined in

shoukaku/src/guild/Connection.ts:40


deafened

deafened: boolean;

Deafen status in connected voice channel

Defined in

shoukaku/src/guild/Connection.ts:52


guildId

guildId: string;

GuildId of the connection that is being managed by this instance

Defined in

shoukaku/src/guild/Connection.ts:36


lastChannelId

lastChannelId: null | string;

Id of the voice channel where this instance was connected before the current channelId

Defined in

shoukaku/src/guild/Connection.ts:56


lastRegion

lastRegion: null | string;

Last region of the connected voice channel

Defined in

shoukaku/src/guild/Connection.ts:68


manager

manager: Shoukaku;

The manager where this connection is on

Defined in

shoukaku/src/guild/Connection.ts:32


muted

muted: boolean;

Mute status in connected voice channel

Defined in

shoukaku/src/guild/Connection.ts:48


region

region: null | string;

Region of connected voice channel

Defined in

shoukaku/src/guild/Connection.ts:64


serverUpdate

serverUpdate: null | ServerUpdate;

Cached serverUpdate event from Lavalink

Defined in

shoukaku/src/guild/Connection.ts:72


sessionId

sessionId: null | string;

Id of the currently active voice channel connection

Defined in

shoukaku/src/guild/Connection.ts:60


shardId

shardId: number;

ShardId where this connection sends data on

Defined in

shoukaku/src/guild/Connection.ts:44


state

state: State;

Connection state

Defined in

shoukaku/src/guild/Connection.ts:76

Methods

setDeaf()

setDeaf(deaf: boolean): void

Set the deafen status for the current bot user

Parameters

ParameterTypeDefault valueDescription
deafbooleanfalseBoolean value to indicate whether to deafen or undeafen

Returns

void

Default Value

false

Defined in

shoukaku/src/guild/Connection.ts:107


setMute()

setMute(mute: boolean): void

Set the mute status for the current bot user

Parameters

ParameterTypeDefault valueDescription
mutebooleanfalseBoolean value to indicate whether to mute or unmute

Returns

void

Default Value

false

Defined in

shoukaku/src/guild/Connection.ts:117