aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-07-10 03:40:35 -0400
committerRapptz <[email protected]>2019-07-10 04:51:27 -0400
commit7b8d50a9885cef35322b3ee4a7212db1ba0ff8b7 (patch)
treeb7e1b7729e049bfe63898d8654a0b34f7c848da1 /discord/client.py
parentDifferent method of upgrading user instances (diff)
downloaddiscord.py-7b8d50a9885cef35322b3ee4a7212db1ba0ff8b7.tar.xz
discord.py-7b8d50a9885cef35322b3ee4a7212db1ba0ff8b7.zip
Add support for guild subscriptions.
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py
index e4804594..731f4b31 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -152,6 +152,30 @@ class Client:
WebSocket in the case of not receiving a HEARTBEAT_ACK. Useful if
processing the initial packets take too long to the point of disconnecting
you. The default timeout is 60 seconds.
+ guild_subscriptions: :class:`bool`
+ Whether to dispatching of presence or typing events. Defaults to ``True``.
+
+ .. warning::
+
+ If this is set to ``False`` then the following features will be disabled:
+
+ - No user related updates (:func:`on_user_update` will not dispatch)
+ - No presence related changes will be recorded (e.g. :attr:`Member.activities` or :attr:`Member.status`)
+ - If ``fetch_offline_members`` is set to ``False`` then the user cache will not exist.
+ This makes it difficult or impossible to do many things, for example:
+
+ - Computing permissions
+ - Querying members in a voice channel via :attr:`VoiceChannel.members` will be empty.
+ - Most forms of receiving :class:`Member` will be
+ receiving :class:`User` instead, except for message events.
+ - :attr:`Guild.owner` will usually resolve to ``None``.
+ - :meth:`Guild.get_member` will usually be unavailable.
+ - Anything that involves using :class:`Member`.
+ - :attr:`users` will not be as populated.
+ - etc.
+
+ In short, this makes it so the only member you can reliably query is the
+ message author. Useful for bots that do not require any state.
Attributes
-----------