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
fromTrackResolvableThe track to clone
tonumberThe position to clone at

public createProgressBar(options?): null | string

Create progress bar for current progress

ParameterTypeOptionalDescription
optionsPlayerProgressbarOptionsProgress bar options

public getDurationMultiplier(): number

Get duration multiplier

public getTimestamp(ignoreFilters): null | PlayerTimestamp

Get stream progress

ParameterTypeOptionalDescription
ignoreFiltersbooleanIgnore filters

public getTrackPosition(track): number

Get track position

ParameterTypeOptionalDescription
trackTrackResolvableThe track

public insert(track, index): void

Insert a track on the given position in queue

ParameterTypeOptionalDescription
trackTrack<unknown>The track to insert
indexnumberThe 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
trackTrackResolvableThe track to jump to without removing other tracks

public move(from, to): void

Moves a track in the queue

ParameterTypeOptionalDescription
fromTrackResolvableThe track to move
tonumberThe 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
optionsResourcePlayOptionsOptions 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
trackTrackResolvableThe track to remove
emitEventbooleanWhether 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
durationnumberThe 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
statebooleanThe state

public setProgress(progress): void

Set player progress

ParameterTypeOptional
progressnumber

public setVolume(vol): boolean

Set volume

ParameterTypeOptionalDescription
volnumberVolume 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
trackTrackResolvableThe track to skip to

public stop(force): boolean

Stop the playback

ParameterTypeOptionalDescription
forcebooleanWhether or not to forcefully stop the playback

public swap(first, second): void

Swap two tracks in the queue

ParameterTypeOptionalDescription
firstTrackResolvableThe first track to swap
secondTrackResolvableThe second track to swap