Track
new Track(player, data)
Parameter | Type | Optional | Description |
---|---|---|---|
player | Player | ❌ | The player that instantiated this Track |
data | RawTrackData | ❌ | Track data |
Properties
public author: string
public description: string
public duration: string
public extractor: null | BaseExtractor
public id: string
public player: Player
public playlist: Playlist
public queryType: undefined | null | SearchQueryType
public raw: RawTrackData
public requestedBy: null | User
public thumbnail: string
public title: string
public url: string
public views: number
public durationMS: number
The track duration in millisecond
public queue: GuildQueue<unknown>
The queue in which this track is located
public source: TrackSource
Returns source of this track
Methods
private _patch(data): void
Parameter | Type | Optional | Description |
---|---|---|---|
data | RawTrackData | ❌ | - |
public toJSON(hidePlaylist?): TrackJSON
Raw JSON representation of this track
Parameter | Type | Optional | Description |
---|---|---|---|
hidePlaylist | boolean | ✅ | - |
public toString(): string
String representation of this track