feat(bot): Stop heartbeat when shard disconnects from Discord.
This commit is contained in:
@@ -124,6 +124,9 @@ class Payphone(commands.AutoShardedBot):
|
||||
|
||||
print(f"Shard {shard_id} was resumed!")
|
||||
|
||||
async def on_shard_disconnect(shard_id: int) -> None:
|
||||
self.update_heartbeat.cancel()
|
||||
|
||||
async def get_or_fetch_channel(
|
||||
self, channel_id: int
|
||||
) -> abc.GuildChannel | abc.PrivateChannel | discord.Thread | None:
|
||||
|
||||
Reference in New Issue
Block a user