Skip to main content

ruvyrias / Exports / Response

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

NameType
responseLoadTrackResponse
requesterany

Returns

Response

Defined in

src/Guild/Response.ts:128

Properties

loadType

loadType: LoadType

Defined in

src/Guild/Response.ts:125


playlistInfo

Optional playlistInfo: PlaylistInfo

Defined in

src/Guild/Response.ts:126


tracks

tracks: Track[]

Defined in

src/Guild/Response.ts:124

Methods

handleTracks

handleTracks(data, requester): Track[]

Helper function to handle tracks in the Response class.

Parameters

NameTypeDescription
dataTrackData | TrackData[]The track data or an array of track data.
requesteranyThe requester object.

Returns

Track[]

An array of Track instances.

Defined in

src/Guild/Response.ts:164