Constructor
new Node(options)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Object that contains the options for the Node
Properties
|
Extends
- EventEmitter
Members
botId :String
This Node's ID
Type:
- String
fetchUrl :String
This Node's API URL
Type:
- String
pass :String
This Node's password
Type:
- String
players :Object
This Node's player
Type:
- Object
sendPayload :function
This Node's function to send payload to Discord server
Type:
- function
serverName :String
This Node's name
Type:
- String
sessionId :String
This Node's session ID
Type:
- String
stats :Object
This Node's stats
Type:
- Object
url :String
This Node's WS URL
Type:
- String
userAgent :String
Useragent used to connect this node
Type:
- String
Methods
(async) decodeTrack(track) → {Object}
Decode a track
Parameters:
Name | Type | Description |
---|---|---|
track |
String | Track to decode that is encoded to base64 |
Returns:
- Decoded track
- Type
- Object
(async) decodeTracks(tracks) → {Object}
Decode multiple tracks
Parameters:
Name | Type | Description |
---|---|---|
tracks |
Array | Array of tracks to decode that are encoded to base64 |
Returns:
- Decoded tracks
- Type
- Object
destroy() → {Boolean}
Destroy this node
Returns:
- True if successful
- Type
- Boolean
getPlayer(guildId) → {Object}
Get player on specified guild
Parameters:
Name | Type | Description |
---|---|---|
guildId |
String | Guild ID |
Returns:
- The player for the guild
- Type
- Object
getPlayers() → {Object}
Get players
Returns:
- Players
- Type
- Object
(async) getStats() → {Object}
Get states
Returns:
- States
- Type
- Object
(async) joinVoiceChannel(options) → {Object}
Join voice channel
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Object that contains the options for the voice channel
Properties
|
Returns:
- Player instance
- Type
- Object
leaveVoiceChannel(guildId) → {Object}
Leave voice channel
Parameters:
Name | Type | Description |
---|---|---|
guildId |
String | Guild ID |
Returns:
- This node instance
- Type
- Object
(async) loadLyrics(track, lang) → {Object}
Load lyrics
Parameters:
Name | Type | Description |
---|---|---|
track |
String | Track to load lyrics for |
lang |
String | Language to load lyrics in |
Returns:
- Lyric
- Type
- Object
(async) loadTracks(data) → {Object}
Load tracks
Parameters:
Name | Type | Description |
---|---|---|
data |
String | Data to load |
Returns:
- Load results
- Type
- Object
startWs() → {Object}
Start WS with LavaLink server
Returns:
- This node instance
- Type
- Object