Rest
Wrapper around Lavalink REST API
Constructors
new Rest()
Parameters
Parameter | Type | Description |
---|---|---|
node | Node | An instance of Node |
options | NodeOption | The options to initialize this rest class |
Returns
Defined in
Methods
decode()
Decode a track
Parameters
Parameter | Type | Description |
---|---|---|
track | string | Encoded track |
Returns
Promise
<undefined
| Track
>
Promise that resolves to a track
Defined in
destroyPlayer()
Deletes a Lavalink player
Parameters
Parameter | Type | Description |
---|---|---|
guildId | string | guildId where this player is |
Returns
Promise
<void
>
Defined in
getLavalinkInfo()
Get Lavalink info
Returns
Promise
<undefined
| NodeInfo
>
Defined in
getPlayer()
Gets the player with the specified guildId
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<undefined
| LavalinkPlayer
>
Promise that resolves to a Lavalink player
Defined in
getPlayers()
Gets all the player with the specified sessionId
Returns
Promise
<LavalinkPlayer
[]>
Promise that resolves to an array of Lavalink players
Defined in
getRoutePlannerStatus()
Get routeplanner status from Lavalink
Returns
Promise
<undefined
| RoutePlanner
>
Promise that resolves to a routeplanner response
Defined in
resolve()
Resolve a track
Parameters
Parameter | Type | Description |
---|---|---|
identifier | string | Track ID |
Returns
Promise
<undefined
| LavalinkResponse
>
A promise that resolves to a Lavalink response
Defined in
stats()
Gets the status of this node
Returns
Promise
<undefined
| Stats
>
Promise that resolves to a node stats response
Defined in
unmarkFailedAddress()
Release blacklisted IP address into pool of IPs
Parameters
Parameter | Type | Description |
---|---|---|
address | string | IP address |
Returns
Promise
<void
>
Defined in
updatePlayer()
Updates a Lavalink player
Parameters
Parameter | Type | Description |
---|---|---|
data | UpdatePlayerInfo | SessionId from Discord |
Returns
Promise
<undefined
| LavalinkPlayer
>
Promise that resolves to a Lavalink player
Defined in
updateSession()
Updates the session with a resume boolean and timeout
Parameters
Parameter | Type | Description |
---|---|---|
resuming ? | boolean | Whether resuming is enabled for this session or not |
timeout ? | number | Timeout to wait for resuming |
Returns
Promise
<undefined
| SessionInfo
>
Promise that resolves to a Lavalink player