fix(tasks): add error handling to presence changing

This commit is contained in:
Ryan 2025-01-08 08:26:36 -05:00
parent c34bdc2bfd
commit 8d0bec4cf2
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -21,5 +21,8 @@ async def cleanup():
not idle_tracker["is_idle"] not idle_tracker["is_idle"]
and time.time() - idle_tracker["last_used"] >= 3600 and time.time() - idle_tracker["last_used"] >= 3600
): ):
await client.change_presence(status=disnake.Status.idle) try:
idle_tracker["is_idle"] = True await client.change_presence(status=disnake.Status.idle)
idle_tracker["is_idle"] = True
except Exception as e:
print(f"failed to change status to idle: {e}")