diff options
| author | quiprr <[email protected]> | 2021-06-27 20:48:04 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-06-27 23:48:04 -0400 |
| commit | 8b7e5a50b40a92034e8296ae6617822761b5c4f9 (patch) | |
| tree | 59a7bd0a7ad794c7de7e09b363b0125f8fa382da /discord/activity.py | |
| parent | Handle role_id possibly being None for StreamIntegration (diff) | |
| download | discord.py-8b7e5a50b40a92034e8296ae6617822761b5c4f9.tar.xz discord.py-8b7e5a50b40a92034e8296ae6617822761b5c4f9.zip | |
Add discord.Spotify.track_url
Diffstat (limited to 'discord/activity.py')
| -rw-r--r-- | discord/activity.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/discord/activity.py b/discord/activity.py index d40fdccb..5973290d 100644 --- a/discord/activity.py +++ b/discord/activity.py @@ -674,6 +674,14 @@ class Spotify: def track_id(self): """:class:`str`: The track ID used by Spotify to identify this song.""" return self._sync_id + + @property + def track_url(self) -> str: + """:class:`str`: The track URL to listen on Spotify. + + .. versionadded:: 2.0 + """ + return f'https://open.spotify.com/track/{self.track_id}' @property def start(self): |