From de65f7309bc8f8c931f29dcd76ebd9e8b0ee547b Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 8 Aug 2017 21:12:04 -0400 Subject: Add heartbeat_timeout to the Client options. This setting configures how long before a timeout event is emitted internally and disconnects the websocket. Since some users were experiencing issues with the gateway not responding, this should help mitigate the issue for those with poor PCs. --- discord/client.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'discord/client.py') diff --git a/discord/client.py b/discord/client.py index 25fd5bb7..a310c3de 100644 --- a/discord/client.py +++ b/discord/client.py @@ -95,6 +95,11 @@ class Client: A game to start your presence with upon logging on to Discord. status: Optional[:class:`Status`] A status to start your presence with upon logging on to Discord. + heartbeat_timeout: float + The maximum numbers of seconds before timing out and restarting the + 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. Attributes ----------- -- cgit v1.2.3