Track
No description provided
Track
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| player | Player | ❌ | The player that instantiated this Track | 
| data | Partial<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.
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| channel | GuildVoiceChannelResolvable | ❌ | Voice channel on which this track shall be played | 
| options | PlayerNodeInitializerOptions<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
| Parameter | Type | Optional | 
|---|---|---|
| m | null | T | ❌ | 
public toHyperlink(): string
Discord hyperlink representation of this track
public toJSON(hidePlaylist?): TrackJSON
Raw JSON representation of this track
| Parameter | Type | Optional | 
|---|---|---|
| hidePlaylist | boolean | ✅ | 
public toString(): string
String representation of this track
public static fromSerialized(player, data): Track<unknown>
Construct a track from serialized data
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| player | Player | ❌ | Player instance | 
| data | SerializedTrack | ❌ | Serialized data |