Discord Player

GuildQueuePlayerNode

No description provided

GuildQueuePlayerNode

new GuildQueuePlayerNode(queue);
ParameterTypeOptional
queueGuildQueue<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

ParameterTypeOptionalDescription
fromTrackResolvable❌The track to clone
tonumber❌The position to clone at

public createProgressBar(options?): null | string

Create progress bar for current progress

ParameterTypeOptionalDescription
optionsPlayerProgressbarOptions✅Progress bar options

public getDurationMultiplier(): number

Get duration multiplier

public getTimestamp(ignoreFilters): null | PlayerTimestamp

Get stream progress

ParameterTypeOptionalDescription
ignoreFiltersboolean❌Ignore filters

public getTrackPosition(track): number

Get track position

ParameterTypeOptionalDescription
trackTrackResolvable❌The track

public insert(track, index): void

Insert a track on the given position in queue

ParameterTypeOptionalDescription
trackTrack<unknown>❌The track to insert
indexnumber❌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

ParameterTypeOptionalDescription
trackTrackResolvable❌The track to jump to without removing other tracks

public move(from, to): void

Moves a track in the queue

ParameterTypeOptionalDescription
fromTrackResolvable❌The track to move
tonumber❌The position to move to

public pause(): boolean

Pause the playback

public play(res?, options?): Promise<void>

Play the given track

ParameterTypeOptionalDescription
resnull | Track<unknown>✅The track to play
optionsResourcePlayOptions✅Options for playing the track

public playRaw(resource): Promise<void>

Play raw audio resource

ParameterTypeOptionalDescription
resourceAudioResource<unknown>❌The audio resource to play

public remove(track, emitEvent): null | Track<unknown>

Remove the given track from queue

ParameterTypeOptionalDescription
trackTrackResolvable❌The track to remove
emitEventboolean❌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

ParameterTypeOptionalDescription
durationnumber❌The duration to seek to

public setBitrate(rate): void

Set bit rate

ParameterTypeOptionalDescription
ratenumber'auto'❌The bit rate to set

public setPaused(state): boolean

Set paused state

ParameterTypeOptionalDescription
stateboolean❌The state

public setProgress(progress): void

Set player progress

ParameterTypeOptional
progressnumber❌

public setVolume(vol): boolean

Set volume

ParameterTypeOptionalDescription
volnumber❌Volume amount to set

public skip(options?): boolean

Skip current track

ParameterTypeOptional
optionsSkipOptions✅

public skipTo(track): boolean

Skip to the given track, removing others on the way

ParameterTypeOptionalDescription
trackTrackResolvable❌The track to skip to

public stop(force): boolean

Stop the playback

ParameterTypeOptionalDescription
forceboolean❌Whether or not to forcefully stop the playback

public swap(first, second): void

Swap two tracks in the queue

ParameterTypeOptionalDescription
firstTrackResolvable❌The first track to swap
secondTrackResolvable❌The second track to swap