diff --git a/astrbot/core/message/message_event_result.py b/astrbot/core/message/message_event_result.py index 48d0b18c9..4cc7fb842 100644 --- a/astrbot/core/message/message_event_result.py +++ b/astrbot/core/message/message_event_result.py @@ -151,4 +151,5 @@ class MessageEventResult(MessageChain): """是否为 LLM 结果。""" return self.result_content_type == ResultContentType.LLM_RESULT + CommandResult = MessageEventResult diff --git a/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_message_event.py b/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_message_event.py index 08990015e..0dfe41a4e 100644 --- a/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_message_event.py +++ b/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_message_event.py @@ -4,6 +4,7 @@ from astrbot.api.event import AstrMessageEvent, MessageChain from astrbot.api.message_components import Plain, Image, Record, At, Node, Nodes from aiocqhttp import CQHttp + class AiocqhttpMessageEvent(AstrMessageEvent): def __init__( self, message_str, message_obj, platform_meta, session_id, bot: CQHttp diff --git a/astrbot/core/platform/sources/gewechat/client.py b/astrbot/core/platform/sources/gewechat/client.py index 90e60a255..c7fd52e19 100644 --- a/astrbot/core/platform/sources/gewechat/client.py +++ b/astrbot/core/platform/sources/gewechat/client.py @@ -125,7 +125,7 @@ class SimpleGewechatClient: abm = AstrBotMessage() # if type_name == "ModContacts": - # self + # self from_user_name = d["FromUserName"]["string"] # 消息来源 d["to_wxid"] = from_user_name # 用于发信息 @@ -642,12 +642,9 @@ class SimpleGewechatClient: json_blob = await resp.json() logger.debug(f"获取群信息结果: {json_blob}") return json_blob + async def send_message(self, to_wxid, content): - payload = { - "appId": self.appid, - "toWxid": to_wxid, - "content":content - } + payload = {"appId": self.appid, "toWxid": to_wxid, "content": content} async with aiohttp.ClientSession() as session: async with session.post(