From 53a3736b043ebd2ff51f6dd82b70bbba9627eeb7 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Mon, 16 Jun 2025 23:26:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E7=9A=84=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes: #1778 --- .../platform/sources/wechatpadpro/wechatpadpro_adapter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py b/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py index 5519c9d21..eabca36d8 100644 --- a/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py +++ b/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py @@ -165,6 +165,8 @@ class WeChatPadProAdapter(Platform): """ 检查 WeChatPadPro 设备是否在线。 """ + if not self.auth_key: + return False url = f"{self.base_url}/login/GetLoginStatus" params = {"key": self.auth_key} @@ -183,7 +185,7 @@ class WeChatPadProAdapter(Platform): logger.info("WeChatPadPro 设备不在线。") return False else: - logger.error(f"未知的在线状态: {login_state:}") + logger.error(f"未知的在线状态: {response_data}") return False # Code == 300 为微信退出状态。 elif response.status == 200 and response_data.get("Code") == 300: