DisTube API Documentation
    Preparing search index...

    Class Song<T>

    Class representing a song.

    Type Parameters

    • T = unknown
    Index

    Constructors

    Properties

    ageRestricted?: boolean

    Whether or not an age-restricted content

    dislikes?: number

    Song dislike count

    duration: number

    Song duration.

    formattedDuration: string

    Formatted duration string (hh:mm:ss, mm:ss or Live).

    id: string

    Song ID.

    isLive?: boolean

    Indicates if the song is an active live.

    likes?: number

    Song like count

    name?: string

    Song name.

    plugin: DisTubePlugin | null

    The plugin that created this song

    reposts?: number

    Song repost (share) count

    source: string

    The source of this song info

    stream:
        | { playFromSource: true; url?: string }
        | { playFromSource: false; song?: Song<T> }

    Stream info

    Type Declaration

    • { playFromSource: true; url?: string }
      • playFromSource: true

        The stream of this song will be played from source

      • Optionalurl?: string

        Stream URL of this song

    • { playFromSource: false; song?: Song<T> }
      • playFromSource: false

        The stream of this song will be played from another song

      • Optionalsong?: Song<T>

        The song that this song will be played from

    thumbnail?: string

    Song thumbnail.

    uploader: { name?: string; url?: string }

    Song uploader

    url?: string

    Song URL.

    views?: number

    Song view count

    Accessors

    • get member(): GuildMember | undefined

      User requested to play this song.

      Returns GuildMember | undefined

    • set member(member: GuildMember | undefined): void

      Parameters

      • member: GuildMember | undefined

      Returns void

    • get user(): User | undefined

      User requested to play this song.

      Returns User | undefined

    Methods