diff options
| author | Rapptz <[email protected]> | 2020-05-24 08:34:35 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-07-25 09:59:40 -0400 |
| commit | d37b91dfc66c14ee29a334337b8cf63f974d6c4a (patch) | |
| tree | a712e7b9019005ec89e09f3b6b5aec80bd9b2748 /discord/client.py | |
| parent | Add a timeout for receiving websocket messages. (diff) | |
| download | discord.py-d37b91dfc66c14ee29a334337b8cf63f974d6c4a.tar.xz discord.py-d37b91dfc66c14ee29a334337b8cf63f974d6c4a.zip | |
Add guild_ready_timeout to control the timeout of GUILD_CREATE stream
This also fixes a timing issue where READY would take far too long to
load for big bot authors.
Closes #4112
Diffstat (limited to 'discord/client.py')
| -rw-r--r-- | discord/client.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py index a0e27d8e..b6a54450 100644 --- a/discord/client.py +++ b/discord/client.py @@ -159,6 +159,11 @@ 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_ready_timeout: :class:`float` + 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. + + .. versionadded:: 1.4 guild_subscriptions: :class:`bool` Whether to dispatching of presence or typing events. Defaults to ``True``. |