API Reference - Welcome to discord.py
discordpy.readthedocs.io › en › stableshard_id (int) – The shard ID that has connected. discord.on_disconnect ¶ Called when the client has disconnected from Discord, or a connection attempt to Discord has failed. This could happen either through the internet being disconnected, explicit calls to close, or Discord terminating the connection one way or the other.