Discord Player

Track

No description provided

Track

new Track(player, data);
ParameterTypeOptionalDescription
playerPlayer❌The player that instantiated this Track
dataPartial<WithMetadata<RawTrackData, T>>❌Track data

Properties

public author: any

public bridgedExtractor: any

public bridgedTrack: any

public cleanTitle: any

public description: any

public duration: any

public extractor: any

public id: any

public live: any

public player: any

The player that instantiated this Track

public playlist: any

public queryType: any

public raw: any

public requestedBy: any

public thumbnail: any

public title: any

public url: any

public views: any

public durationMS: any

The track duration in millisecond

public hasMetadata: any

If this track has metadata

public metadata: any

Metadata of this track

public queue: any

The queue in which this track is located

public source: any

Returns source of this track

Methods

public getBelongingQueues(): Collection<string | GuildQueue<unknown>>

Get belonging queues of this track

public play(channel, options?): Promise<PlayerNodeInitializationResult<T>>

Play this track to the given voice channel. If queue exists and another track is being played, this track will be added to the queue.

ParameterTypeOptionalDescription
channelGuildVoiceChannelResolvable❌Voice channel on which this track shall be played
optionsPlayerNodeInitializerOptions<T>✅Node initialization options

public requestMetadata(): Promise<null | T>

Request metadata for this track

public serialize(): SerializedTrack

Serialized track data that can be reconstructed

public setMetadata(m): void

Set metadata for this track

ParameterTypeOptional
mnull | T❌

Discord hyperlink representation of this track

public toJSON(hidePlaylist?): TrackJSON

Raw JSON representation of this track

ParameterTypeOptional
hidePlaylistboolean✅

public toString(): string

String representation of this track

public static fromSerialized(player, data): Track<unknown>

Construct a track from serialized data

ParameterTypeOptionalDescription
playerPlayer❌Player instance
dataSerializedTrack❌Serialized data