瀏覽代碼

Broadcast OFFLINE presence on disconnect

disconnect() sent PresenceStatus.ONLINE, so the bot stayed online in the
member list after shutdown, contradicting its own log message.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Paul-Dieter Klumpp 1 周之前
父節點
當前提交
693d8c9741
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      adapter.py

+ 2 - 2
adapter.py

@@ -298,10 +298,10 @@ class ChattoAdapter(BasePlatformAdapter):
 
         BasePlatformAdapter override
         """
-        # Broadcast away presence before tearing down
+        # Broadcast offline presence before tearing down
         try:
             client = await self._require_client()
-            await client.update_presence(status=PresenceStatus.ONLINE)
+            await client.update_presence(status=PresenceStatus.OFFLINE)
         except Exception:
             logger.debug("Chatto: update_presence(PresenceStatus.OFFLINE) failed on disconnect", exc_info=True)