FastLink 2.3.5
|
Public Member Functions | |
constructor (guildId) | |
createPlayer () | |
playerCreated () | |
connect (voiceId, options, sendPayload) | |
loadTrack (search) | |
loadCaptions (track, lang) | |
update (body, noReplace) | |
destroy () | |
updateSession (data) | |
getQueue () | |
skipTrack () | |
decodeTrack (track) | |
decodeTracks (tracks) | |
Represents a player for an audio streaming service.
|
inline |
Connects to a voice channel.
voiceId | The ID of the voice channel to connect to. |
options | Options for the connection, deaf or mute. |
sendPayload | A function for sending payload data. |
Error | If the voiceId or sendPayload is not provided, or if they are of invalid type. |
|
inline |
Constructs a Player object.
guildId | The ID of the guild that will be associated with the player. |
Error | If the guildId is not provided, or if they are of invalid type. |
|
inline |
Creates a player for the guild.
Error | If a player already exists for the guild. |
|
inline |
Decodes a track.
track | The array to decode. |
Error | If a track is not provided or if track is not a string. |
|
inline |
Decodes an array of tracks.
tracks | The array of tracks to decode. |
Error | If no tracks are provided or if tracks is not an array. |
|
inline |
Destroys the player.
|
inline |
Gets the queue of tracks.
Error | If the queue is disabled. |
|
inline |
Loads captions for a given track.
track | The track to load captions for. |
lang | The language to load captions for. Optional. |
Error | If the track is not provided or is of invalid type. |
|
inline |
Loads a track.
search | The search query for the track. |
Error | If the search is not provided or is of invalid type. |
|
inline |
Verifies if a player exists for the guild.
|
inline |
Skips the currently playing track.
Error | If the queue is disabled |
|
inline |
Updates the player state.
body | The body of the update request. |
noReplace | Flag to specify whether to replace the existing track or not. Optional. |
Error | If the body is not provided or is of invalid type. |
|
inline |
Updates the session data for the player.
data | The session data to update. |
Error | If the data is not provided or is of invalid type. |