feat(bot): Stop heartbeat when shard disconnects from Discord.

This commit is contained in:
Rafael Bradley
2024-10-26 14:38:09 -03:00
committed by GitHub
parent aa445fbf63
commit 80408b02d1
+3
View File
@@ -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: