aboutsummaryrefslogtreecommitdiff
path: root/discord/shard.py
diff options
context:
space:
mode:
Diffstat (limited to 'discord/shard.py')
-rw-r--r--discord/shard.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/shard.py b/discord/shard.py
index 0b037398..dfa3849c 100644
--- a/discord/shard.py
+++ b/discord/shard.py
@@ -104,6 +104,7 @@ class Shard:
async def _handle_disconnect(self, e):
self._dispatch('disconnect')
+ self._dispatch('shard_disconnect', self.id)
if not self._reconnect:
self._queue.put_nowait(EventItem(EventType.close, self, e))
return
@@ -136,6 +137,7 @@ class Shard:
async def reidentify(self, exc):
self._cancel_task()
self._dispatch('disconnect')
+ self._dispatch('shard_disconnect', self.id)
log.info('Got a request to %s the websocket at Shard ID %s.', exc.op, self.id)
try:
coro = DiscordWebSocket.from_client(self._client, resume=exc.resume, shard_id=self.id,