aboutsummaryrefslogtreecommitdiff
path: root/docs/api.rst
diff options
context:
space:
mode:
authorRapptz <[email protected]>2018-03-05 11:01:46 -0500
committerRapptz <[email protected]>2018-03-05 11:15:49 -0500
commitf8f8f418f3c51b6a885a1b6b7cd46c38c070b3bc (patch)
tree0f26ed361806cf4470b8d98b61f63d2055cf87d0 /docs/api.rst
parentUpdate docstrings for channel.py (diff)
downloaddiscord.py-f8f8f418f3c51b6a885a1b6b7cd46c38c070b3bc.tar.xz
discord.py-f8f8f418f3c51b6a885a1b6b7cd46c38c070b3bc.zip
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.
Diffstat (limited to 'docs/api.rst')
-rw-r--r--docs/api.rst47
1 files changed, 43 insertions, 4 deletions
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
~~~~~~~~~~~~