Skip to main content

ruvyrias / Exports / Connection

Class: Connection

Manages the connection between the player and an external source.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Connection(player): Connection

The connection class

Parameters

NameType
playerPlayer

Returns

Connection

Defined in

src/Player/Connection.ts:86

Properties

channel_id

channel_id: null | string

Defined in

src/Player/Connection.ts:77


endpoint

endpoint: null | string

Defined in

src/Player/Connection.ts:80


player

player: Player

Defined in

src/Player/Connection.ts:73


region

region: null | string

Defined in

src/Player/Connection.ts:74


self_deaf

self_deaf: boolean

Defined in

src/Player/Connection.ts:76


self_mute

self_mute: boolean

Defined in

src/Player/Connection.ts:75


session_id

session_id: null | string

Defined in

src/Player/Connection.ts:78


token

token: null | string

Defined in

src/Player/Connection.ts:79

Methods

setServersUpdate

setServersUpdate(data): Promise<void>

Set the voice server update

Parameters

NameTypeDescription
dataIVoiceServerThe data from the voice server update

Returns

Promise<void>

Defined in

src/Player/Connection.ts:101


setStateUpdate

setStateUpdate(data): Promise<void>

Set the state update

Parameters

NameTypeDescription
dataSetStateUpdateThe data from the state update

Returns

Promise<void>

Defined in

src/Player/Connection.ts:132