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
This commit is contained in:
Rapptz
2020-05-24 08:34:35 -04:00
parent e0660ef8a6
commit d37b91dfc6
2 changed files with 13 additions and 4 deletions

View File

@ -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``.