Classes
Track
Class representing a Hoshimi track.
Signature
export declare class Track implements LavalinkTrackJSDoc
@classTrack@implementsLavalinkTrack
Properties
5Methods
3Properties
readonly encoded: string;The base64 encoded track.
@type{string}
readonly info: TrackInfo;The track info.
@type{TrackInfo}
readonly pluginInfo: PluginInfo;The plugin info of the track.
@type{PluginInfo}
userData?: TrackUserData;The track user data.
@type{TrackUserData}
requester: TrackRequester;The requester of the track.
@type{TrackRequester}
Methods
constructorConstructorconstructor(track: LavalinkTrack | null, requester: TrackRequester);toHyperlink(embedable?: boolean): string;Get the hyperlink of the track.
Parameters
embedable- Whether the hyperlink should be embedable or not.
Returns
The hyperlink of the track.
Examples
const track = queue.current;
console.log(track.toHyperlink()); // [Track Title](https://example.com)
console.log(track.toHyperlink(false)); // [Track Title](<https://example.com>)toJSON(): TrackJSON;Converts the track to a JSON object for storage.
Returns
The JSON representation of the track for storage.