mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 10:53:10 +00:00
Add on_disconnect event.
I assume this is where it has to be. Fix #1937
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user