Class: Response
Represents a response handler for processing responses from Lavalink when loading tracks. This class encapsulates the loaded tracks and provides utility methods for accessing and handling them.
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new Response(response
, requester
): Response
Parameters
Name | Type |
---|---|
response | LoadTrackResponse |
requester | any |
Returns
Defined in
Properties
loadType
• loadType: LoadType
Defined in
playlistInfo
• Optional
playlistInfo: PlaylistInfo
Defined in
tracks
• tracks: Track
[]
Defined in
Methods
handleTracks
▸ handleTracks(data
, requester
): Track
[]
Helper function to handle tracks in the Response class.
Parameters
Name | Type | Description |
---|---|---|
data | TrackData | TrackData [] | The track data or an array of track data. |
requester | any | The requester object. |
Returns
Track
[]
An array of Track instances.