hoshimi
    Preparing search index...

    Class Track

    Class representing a Hoshimi track. Track

    Implements

    Index

    Constructors

    • The constructor for the track.

      Parameters

      • track: LavalinkTrack | null

        The track to construct the track from.

      • Optionalrequester: unknown

        The requester of the track.

      Returns Track

      const track = Structures.Track({
      encoded: "base64",
      info: {
      title: "Track Title",
      uri: "https://example.com",
      duration: 300000,
      },
      // the rest of the track info
      }, requester);

      console.log(track.encoded); // the track encoded in base64

    Properties

    encoded: string

    The base64 encoded track.

    info: TrackInfo

    The track info.

    pluginInfo: PluginInfo

    The plugin info of the track.

    requester: unknown

    The requester of the track.

    userData: unknown

    The track user data.

    Methods

    • Get the hyperlink of the track.

      Parameters

      • Optionalembedable: boolean = true

        Whether the hyperlink should be embedable or not.

      Returns string

      The hyperlink of the track.

      const track = queue.current;
      console.log(track.toHyperlink()); // [Track Title](https://example.com)
      console.log(track.toHyperlink(false)); // [Track Title](<https://example.com>)