Show / Hide Table of Contents

# Class SpotifyGame

A user's activity for listening to a song on Spotify.

##### Inheritance

System.Object
Game
SpotifyGame

##### Implements

IActivity

##### Inherited Members

Game.Name
Game.Type
Game.Flags
Game.Details
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Discord

###### Assembly: Discord.Net.Core.dll

##### Syntax

    public class SpotifyGame : Game, IActivity

### Properties

| Improve this Doc View Source

#### AlbumArtUrl

Gets the URL of the album art.

##### Declaration

    public string AlbumArtUrl { get; }

##### Property Value

Type | Description
--- | ---
System.String | A URL pointing to the album art of the track (e.g. `https://i.scdn.co/image/ba2fd8823d42802c2f8738db0b33a4597f2f39e7`).

| Improve this Doc View Source

#### AlbumTitle

Gets the Spotify album title of the song.

##### Declaration

    public string AlbumTitle { get; }

##### Property Value

Type | Description
--- | ---
System.String | A string containing the name of the album (e.g. `AVĪCI (01)`).

| Improve this Doc View Source

#### Artists

Gets the song's artist(s).

##### Declaration

    public IReadOnlyCollection<string> Artists { get; }

##### Property Value

Type | Description
--- | ---
System.Collections.Generic.IReadOnlyCollection<System.String> | A collection of string containing all artists featured in the track (e.g. `Avicii`; `Rita Ora`).

| Improve this Doc View Source

#### Duration

Gets the duration of the song.

##### Declaration

    public TimeSpan? Duration { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.TimeSpan> | A System.TimeSpan containing the duration of the song.

| Improve this Doc View Source

#### Elapsed

Gets the elapsed duration of the song.

##### Declaration

    public TimeSpan? Elapsed { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.TimeSpan> | A System.TimeSpan containing the elapsed duration of the song.

| Improve this Doc View Source

#### EndsAt

Gets the date when the track ends.

##### Declaration

    public DateTimeOffset? EndsAt { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.DateTimeOffset> | A System.DateTimeOffset containing the finish timestamp of the song.

| Improve this Doc View Source

#### Remaining

Gets the remaining duration of the song.

##### Declaration

    public TimeSpan? Remaining { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.TimeSpan> | A System.TimeSpan containing the remaining duration of the song.

| Improve this Doc View Source

#### SessionId

Gets the session ID of the song.

##### Declaration

    public string SessionId { get; }

##### Property Value

Type | Description
--- | ---
System.String | A string containing the session ID.

##### Remarks

The purpose of this property is currently unknown.

| Improve this Doc View Source

#### StartedAt

Gets the date when the track started playing.

##### Declaration

    public DateTimeOffset? StartedAt { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.DateTimeOffset> | A System.DateTimeOffset containing the start timestamp of the song.

| Improve this Doc View Source

#### TrackId

Gets the track ID of the song.

##### Declaration

    public string TrackId { get; }

##### Property Value

Type | Description
--- | ---
System.String | A string containing the Spotify ID of the track (e.g. `7DoN0sCGIT9IcLrtBDm4f0`).

| Improve this Doc View Source

#### TrackTitle

Gets the track title of the song.

##### Declaration

    public string TrackTitle { get; }

##### Property Value

Type | Description
--- | ---
System.String | A string containing the name of the song (e.g. `Lonely Together (feat. Rita Ora)`).

| Improve this Doc View Source

#### TrackUrl

Gets the direct Spotify URL of the track.

##### Declaration

    public string TrackUrl { get; }

##### Property Value

Type | Description
--- | ---
System.String | A URL pointing directly to the track on Spotify. (e.g. `https://open.spotify.com/track/7DoN0sCGIT9IcLrtBDm4f0`).

### Methods

| Improve this Doc View Source

#### ToString()

Gets the full information of the song.

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String | A string containing the full information of the song (e.g. `Avicii, Rita Ora - Lonely Together (feat. Rita Ora) (3:08)`

##### Overrides

Game.ToString()

### Implements

IActivity