GuildQueuePlayerNode
No description provided
GuildQueuePlayerNode
Parameter | Type | Optional |
---|---|---|
queue | GuildQueue<Meta> | ❌ |
Properties
public queue: any
public tasksQueue: any
public estimatedDuration: any
Estimated total duration of the player
public estimatedPlaybackTime: any
Estimated progress of the player
public playbackTime: any
Current playback duration with history included
public streamTime: any
The stream time for current session
public totalDuration: any
Total duration of the current audio track
public volume: any
Current volume
Methods
public copy(from, to): void
Copy a track in the queue
Parameter | Type | Optional | Description |
---|---|---|---|
from | TrackResolvable | ❌ | The track to clone |
to | number | ❌ | The position to clone at |
public createProgressBar(options?): null | string
Create progress bar for current progress
Parameter | Type | Optional | Description |
---|---|---|---|
options | PlayerProgressbarOptions | ✅ | Progress bar options |
public getDurationMultiplier(): number
Get duration multiplier
public getTimestamp(ignoreFilters): null | PlayerTimestamp
Get stream progress
Parameter | Type | Optional | Description |
---|---|---|---|
ignoreFilters | boolean | ❌ | Ignore filters |
public getTrackPosition(track): number
Get track position
Parameter | Type | Optional | Description |
---|---|---|---|
track | TrackResolvable | ❌ | The track |
public insert(track, index): void
Insert a track on the given position in queue
Parameter | Type | Optional | Description |
---|---|---|---|
track | Track<unknown> | ❌ | The track to insert |
index | number | ❌ | The position to insert to, defaults to 0. |
public isBuffering(): boolean
If the player is currently buffering the track
public isIdle(): boolean
If the player is currently in idle mode
public isPaused(): boolean
If the player is currently paused
public isPlaying(): boolean
If the player is currently playing a track
public jump(track): boolean
Jump to specific track on the queue
Parameter | Type | Optional | Description |
---|---|---|---|
track | TrackResolvable | ❌ | The track to jump to without removing other tracks |
public move(from, to): void
Moves a track in the queue
Parameter | Type | Optional | Description |
---|---|---|---|
from | TrackResolvable | ❌ | The track to move |
to | number | ❌ | The position to move to |
public pause(): boolean
Pause the playback
public play(res?, options?): Promise<void>
Play the given track
Parameter | Type | Optional | Description |
---|---|---|---|
res | null | Track<unknown> | ✅ | The track to play |
options | ResourcePlayOptions | ✅ | Options for playing the track |
public playRaw(resource): Promise<void>
Play raw audio resource
Parameter | Type | Optional | Description |
---|---|---|---|
resource | AudioResource<unknown> | ❌ | The audio resource to play |
public remove(track, emitEvent): null | Track<unknown>
Remove the given track from queue
Parameter | Type | Optional | Description |
---|---|---|---|
track | TrackResolvable | ❌ | The track to remove |
emitEvent | boolean | ❌ | Whether or not to emit the event |
public resetProgress(): void
Reset progress history
public resume(): boolean
Resume the playback
public seek(duration): Promise<boolean>
Seek the player
Parameter | Type | Optional | Description |
---|---|---|---|
duration | number | ❌ | The duration to seek to |
public setBitrate(rate): void
Set bit rate
Parameter | Type | Optional | Description |
---|---|---|---|
rate | number'auto' | ❌ | The bit rate to set |
public setPaused(state): boolean
Set paused state
Parameter | Type | Optional | Description |
---|---|---|---|
state | boolean | ❌ | The state |
public setProgress(progress): void
Set player progress
Parameter | Type | Optional |
---|---|---|
progress | number | ❌ |
public setVolume(vol): boolean
Set volume
Parameter | Type | Optional | Description |
---|---|---|---|
vol | number | ❌ | Volume amount to set |
public skip(options?): boolean
Skip current track
Parameter | Type | Optional |
---|---|---|
options | SkipOptions | ✅ |
public skipTo(track): boolean
Skip to the given track, removing others on the way
Parameter | Type | Optional | Description |
---|---|---|---|
track | TrackResolvable | ❌ | The track to skip to |
public stop(force): boolean
Stop the playback
Parameter | Type | Optional | Description |
---|---|---|---|
force | boolean | ❌ | Whether or not to forcefully stop the playback |
public swap(first, second): void
Swap two tracks in the queue
Parameter | Type | Optional | Description |
---|---|---|---|
first | TrackResolvable | ❌ | The first track to swap |
second | TrackResolvable | ❌ | The second track to swap |