Remove support for guild subscriptions

This commit is contained in:
apple502j 2021-04-14 13:47:46 +09:00 committed by GitHub
parent 23aaa75802
commit dea92a69dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 33 deletions

View File

@ -159,37 +159,6 @@ class Client:
preparing the member cache and firing READY. The default timeout is 2 seconds. preparing the member cache and firing READY. The default timeout is 2 seconds.
.. versionadded:: 1.4 .. versionadded:: 1.4
guild_subscriptions: :class:`bool`
Whether to dispatch presence or typing events. Defaults to ``True``.
.. versionadded:: 1.3
.. 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)
- All member related events will be disabled.
- :func:`on_member_update`
- :func:`on_member_join`
- :func:`on_member_remove`
- Typing events will be disabled (:func:`on_typing`).
- 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.
assume_unsync_clock: :class:`bool` assume_unsync_clock: :class:`bool`
Whether to assume the system clock is unsynced. This applies to the ratelimit handling Whether to assume the system clock is unsynced. This applies to the ratelimit handling
code. If this is set to ``True``, the default, then the library uses the time to reset code. If this is set to ``True``, the default, then the library uses the time to reset

View File

@ -373,7 +373,6 @@ class DiscordWebSocket:
}, },
'compress': True, 'compress': True,
'large_threshold': 250, 'large_threshold': 250,
'guild_subscriptions': self._connection.guild_subscriptions,
'v': 3 'v': 3
} }
} }

View File

@ -120,7 +120,6 @@ class ConnectionState:
if self.guild_ready_timeout < 0: if self.guild_ready_timeout < 0:
raise ValueError('guild_ready_timeout cannot be negative') raise ValueError('guild_ready_timeout cannot be negative')
self.guild_subscriptions = options.get('guild_subscriptions', True)
allowed_mentions = options.get('allowed_mentions') allowed_mentions = options.get('allowed_mentions')
if allowed_mentions is not None and not isinstance(allowed_mentions, AllowedMentions): if allowed_mentions is not None and not isinstance(allowed_mentions, AllowedMentions):