From 963cf4b34e1de5cba4879689894f6ccb84cf3d9f Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 18 Mar 2019 05:29:38 -0400 Subject: Add on_disconnect event. I assume this is where it has to be. Fix #1937 --- discord/client.py | 1 + 1 file changed, 1 insertion(+) (limited to 'discord/client.py') diff --git a/discord/client.py b/discord/client.py index 7f9e2c30..b8b4e051 100644 --- a/discord/client.py +++ b/discord/client.py @@ -409,6 +409,7 @@ class Client: websockets.InvalidHandshake, websockets.WebSocketProtocolError) as exc: + self.dispatch('disconnect') if not reconnect: await self.close() if isinstance(exc, ConnectionClosed) and exc.code == 1000: -- cgit v1.2.3