From f8f8f418f3c51b6a885a1b6b7cd46c38c070b3bc Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 5 Mar 2018 11:01:46 -0500 Subject: Split Game object to separate Activity subtypes for Rich Presences. This is a massive breaking change. * All references to "game" have been renamed to "activity" * Activity objects contain a majority of the rich presence information * Game and Streaming are subtypes for memory optimisation purposes for the more common cases. * Introduce a more specialised read-only type, Spotify, for the official Spotify integration to make it easier to use. --- docs/api.rst | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/api.rst b/docs/api.rst index 30b68374..fc08aee2 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -687,6 +687,27 @@ All enumerations are subclasses of `enum`_. The system message denoting that a new member has joined a Guild. +.. class:: ActivityType + + Specifies the type of :class:`Activity`. This is used to check how to + interpret the activity itself. + + .. attribute:: unknown + + An unknown activity type. This should generally not happen. + .. attribute:: playing + + A "Playing" activity type. + .. attribute:: streaming + + A "Streaming" activity type. + .. attribute:: listening + + A "Listening" activity type. + .. attribute:: watching + + A "Watching" activity type. + .. class:: VoiceRegion Specifies the region a voice server belongs to. @@ -698,7 +719,7 @@ All enumerations are subclasses of `enum`_. The US East region. .. attribute:: us_south - + The US South region. .. attribute:: us_central @@ -729,10 +750,10 @@ All enumerations are subclasses of `enum`_. The Brazil region. .. attribute:: hongkong - + The Hong Kong region. .. attribute:: russia - + The Russia region. .. attribute:: vip_us_east @@ -1880,6 +1901,12 @@ Member .. autocomethod:: typing :async-with: +Spotify +~~~~~~~~ + +.. autoclass:: Spotify() + :members: + VoiceState ~~~~~~~~~~~ @@ -2011,12 +2038,24 @@ Colour .. autoclass:: Colour :members: +Activity +~~~~~~~~~ + +.. autoclass:: Activity + :members: + Game -~~~~ +~~~~~ .. autoclass:: Game :members: +Streaming +~~~~~~~~~~~ + +.. autoclass:: Streaming + :members: + Permissions ~~~~~~~~~~~~ -- cgit v1.2.3