Class representing a song.

Type Parameters

  • T = unknown

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: null | DisTubePlugin

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(): undefined | GuildMember

    User requested to play this song.

    Returns undefined | GuildMember

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

    Parameters

    • member: undefined | GuildMember

    Returns void

  • get user(): undefined | User

    User requested to play this song.

    Returns undefined | User

Methods