From 2f9a7a43e1d88b7c2d0fb589662104eac4fe6da3 Mon Sep 17 00:00:00 2001 From: Chaxin Studio Date: Fri, 3 Jul 2026 17:56:03 +0800 Subject: [PATCH] fix(qqbot): accept is_reconnect parameter in QQAdapter.connect() QQAdapter.connect() overrides BasePlatformAdapter.connect() but drops the `is_reconnect` keyword-only argument that the base class supports. When the gateway reconnects after a disconnect, it calls adapter.connect(is_reconnect=True), causing a TypeError. Fix by adding `*, is_reconnect: bool = False` to match the base class signature, consistent with other platform adapters (api_server, bluebubbles). --- gateway/platforms/qqbot/adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/platforms/qqbot/adapter.py b/gateway/platforms/qqbot/adapter.py index 300a935562160..e9628700428e2 100644 --- a/gateway/platforms/qqbot/adapter.py +++ b/gateway/platforms/qqbot/adapter.py @@ -278,7 +278,7 @@ def enforces_own_access_policy(self) -> bool: # Connection lifecycle # ------------------------------------------------------------------ - async def connect(self) -> bool: + async def connect(self, *, is_reconnect: bool = False) -> bool: """Authenticate, obtain gateway URL, and open the WebSocket.""" if not AIOHTTP_AVAILABLE: message = "QQ startup failed: aiohttp not installed"