This commit is contained in:
Nyeki.py
2024-10-27 00:19:49 -03:00
+10
View File
@@ -108,6 +108,16 @@ class Payphone(commands.AutoShardedBot):
print(f"Shard {shard_id} was resumed!")
async def on_shard_connect(self, shard_id: int) -> None:
try:
self.update_heartbeat.start()
except RuntimeError:
pass
async def on_shard_disconnect(self, 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: