Connection
This content is for the 4.1.0 version. Switch to the latest version for up-to-date documentation.
Represents a connection to a Discord voice channel
Extends
EventEmitter
Constructors
new Connection()
new Connection(manager: Shoukaku, options: VoiceChannelOptions): Connection
Parameters
Parameter | Type | Description |
---|---|---|
manager | Shoukaku | The manager of this connection |
options | VoiceChannelOptions | The options to pass in connection creation |
Returns
Overrides
EventEmitter.constructor
Defined in
shoukaku/src/guild/Connection.ts:85
Properties
channelId
channelId: null | string;
VoiceChannelId of the connection that is being managed by this instance
Defined in
shoukaku/src/guild/Connection.ts:39
deafened
deafened: boolean;
Deafen status in connected voice channel
Defined in
shoukaku/src/guild/Connection.ts:51
guildId
guildId: string;
GuildId of the connection that is being managed by this instance
Defined in
shoukaku/src/guild/Connection.ts:35
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:55
lastRegion
lastRegion: null | string;
Last region of the connected voice channel
Defined in
shoukaku/src/guild/Connection.ts:67
manager
manager: Shoukaku;
The manager where this connection is on
Defined in
shoukaku/src/guild/Connection.ts:31
muted
muted: boolean;
Mute status in connected voice channel
Defined in
shoukaku/src/guild/Connection.ts:47
region
region: null | string;
Region of connected voice channel
Defined in
shoukaku/src/guild/Connection.ts:63
serverUpdate
serverUpdate: null | ServerUpdate;
Cached serverUpdate event from Lavalink
Defined in
shoukaku/src/guild/Connection.ts:71
sessionId
sessionId: null | string;
Id of the currently active voice channel connection
Defined in
shoukaku/src/guild/Connection.ts:59
shardId
shardId: number;
ShardId where this connection sends data on
Defined in
shoukaku/src/guild/Connection.ts:43
state
state: State;
Connection state
Defined in
shoukaku/src/guild/Connection.ts:75
Methods
setDeaf()
setDeaf(deaf: boolean): void
Set the deafen status for the current bot user
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
deaf | boolean | false | Boolean value to indicate whether to deafen or undeafen |
Returns
void
Default Value
false
Defined in
shoukaku/src/guild/Connection.ts:106
setMute()
setMute(mute: boolean): void
Set the mute status for the current bot user
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
mute | boolean | false | Boolean value to indicate whether to mute or unmute |
Returns
void
Default Value
false