GuildQueueHistory
new GuildQueueHistory(queue)
Parameter | Type | Optional | Description |
---|---|---|---|
queue | GuildQueue<Meta> | ❌ | - |
Properties
public queue: GuildQueue<Meta>
public tracks: Queue<Track>
public currentTrack: null | Track
Current track in the queue
public disabled: boolean
If history is disabled
public nextTrack: null | Track
Next track in the queue
public previousTrack: null | Track
Previous track in the queue
public size: number
Gets the size of the queue
Methods
public back(): Promise<void>
Alias to [GuildQueueHistory].previous()
public clear(): void
Clear history
public getSize(): number
public isEmpty(): boolean
If history is empty
public next(): Promise<void>
Play the next track in the queue
public previous(preserveCurrent): Promise<void>
Play the previous track in the queue
Parameter | Type | Optional | Description |
---|---|---|---|
preserveCurrent | boolean | ❌ | - |
public push(track): boolean
Add track to track history
Parameter | Type | Optional | Description |
---|---|---|---|
track | Track | Array<Track> | ❌ | The track to add |