Connection
Represents a connection to a Discord voice channel
Extends
EventEmitter
Constructors
new Connection()
new Connection(manager: Shoukaku, options: VoiceChannelOptions): ConnectionParameters
| 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): voidSet 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
falseDefined in
shoukaku/src/guild/Connection.ts:106
setMute()
setMute(mute: boolean): voidSet 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