Browse Source

Deprecate Client.assume_unsync_clock

pull/10287/head
imp 2 months ago
committed by GitHub
parent
commit
71d2c5c434
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      discord/client.py

12
discord/client.py

@ -137,6 +137,7 @@ if TYPE_CHECKING:
allowed_mentions: AllowedMentions allowed_mentions: AllowedMentions
heartbeat_timeout: float heartbeat_timeout: float
guild_ready_timeout: float guild_ready_timeout: float
assume_unsync_clock: bool
enable_debug_events: bool enable_debug_events: bool
enable_raw_presences: bool enable_raw_presences: bool
http_trace: aiohttp.TraceConfig http_trace: aiohttp.TraceConfig
@ -242,7 +243,17 @@ class Client:
The maximum number of seconds to wait for the GUILD_CREATE stream to end before The maximum number of seconds to wait for the GUILD_CREATE stream to end before
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
assume_unsync_clock: :class:`bool`
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
a rate limit bucket given by Discord. If this is ``False`` then your system clock is
used to calculate how long to sleep for. If this is set to ``False`` it is recommended to
sync your system clock to Google's NTP server.
.. versionadded:: 1.3 .. versionadded:: 1.3
.. deprecated:: 2.7
This parameter is deprecated and will be removed in a future version as it is unused.
enable_debug_events: :class:`bool` enable_debug_events: :class:`bool`
Whether to enable events that are useful only for debugging gateway related information. Whether to enable events that are useful only for debugging gateway related information.
@ -297,6 +308,7 @@ class Client:
connector: Optional[aiohttp.BaseConnector] = options.get('connector', None) connector: Optional[aiohttp.BaseConnector] = options.get('connector', None)
proxy: Optional[str] = options.pop('proxy', None) proxy: Optional[str] = options.pop('proxy', None)
proxy_auth: Optional[aiohttp.BasicAuth] = options.pop('proxy_auth', None) proxy_auth: Optional[aiohttp.BasicAuth] = options.pop('proxy_auth', None)
unsync_clock: bool = options.pop('assume_unsync_clock', True)
http_trace: Optional[aiohttp.TraceConfig] = options.pop('http_trace', None) http_trace: Optional[aiohttp.TraceConfig] = options.pop('http_trace', None)
max_ratelimit_timeout: Optional[float] = options.pop('max_ratelimit_timeout', None) max_ratelimit_timeout: Optional[float] = options.pop('max_ratelimit_timeout', None)
self.http: HTTPClient = HTTPClient( self.http: HTTPClient = HTTPClient(

Loading…
Cancel
Save