Queue

Overview

Properties

• current

The current track.

TypeValue
Track or UnresolvedTrack or nullnull

• duration

The total time of the queue.

Type
number

• size

The size of tracks in the queue.

Type
number

• previous

The past track.

Type
number

• totalSize

The total size of tracks in the queue including the current track.

Type
number

Methods

• add()

Adds a track to the queue.

Returns: void

Parametertype
trackTrack
Optional offsetnumber

• clear()

DescriptionReturns
Clears the queue.void

• remove()

Removes a track from the queue. Defaults to the first track, returning the removed track, excluding the current track.

Returns: Track[]

Parametertype
Optional positionnumber

• remove()

Removes an amount of tracks using a exclusive start and end exclusive index, returning the removed tracks, excluding the current track.

Returns: Track | UnresolvedTrack[]

Parametertype
startnumber
endnumber

• shuffle()

DescriptionReturns
Mixes the queue.void
Table of Contents