MemoryQueue
Table of Contentsโ
Class Definitionโ
export class MemoryQueue extends Array<Track> implements IQueue {}
Propertiesโ
Property Type Description currentTrack| nullThe current track. guildIdstring The guild ID. managerManagerThe Manager instance. previousTrack[]| []The previous tracks.
Constructorโ
new MemoryQueue(guildId: string, manager: Manager)
Parameter Type Description Optional guildIdstring The guild ID managerManagerThe Manager instance.
Methodsโ
add()โ
async add(track: Track | Track[], offset?: number): Promise<void>Adds a track or an array of tracks to the queue.
Parametersโ
Parameter Type Description Optional trackTrack|Track[]The track or an array of tracks to add to the queue. offsetnumber The offset to add the track at.
addPrevious()โ
async addPrevious(track: Track | Track[]): Promise<void>Adds one or more tracks to the "previous" history list.
Parametersโ
Parameter Type Description Optional trackTrack|Track[]The track to add to the "previous" history list.
clear()โ
async clear(): Promise<void>Clears the queue.