diff --git a/astrbot/core/platform/sources/gewechat/client.py b/astrbot/core/platform/sources/gewechat/client.py index 05e915dc1..30b01ad0c 100644 --- a/astrbot/core/platform/sources/gewechat/client.py +++ b/astrbot/core/platform/sources/gewechat/client.py @@ -81,7 +81,12 @@ class SimpleGewechatClient: self.headers = {"X-GEWE-TOKEN": self.token} async def _convert(self, data: dict) -> AstrBotMessage: - type_name = data["TypeName"] + if "TypeName" in data: + type_name = data["TypeName"] + elif "type_name" in data: + type_name = data["type_name"] + else: + raise Exception("无法识别的消息类型") if type_name == "Offline": logger.critical("收到 gewechat 下线通知。") return