From 77c823c100c89518f295a8f412cec8a868c853d2 Mon Sep 17 00:00:00 2001 From: anka <1350989414@qq.com> Date: Mon, 12 May 2025 11:32:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E5=AF=B9=E5=85=A8?= =?UTF-8?q?=E4=BD=93=E6=88=90=E5=91=98=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sources/aiocqhttp/aiocqhttp_platform_adapter.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py b/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py index eb50ad679..cbf40edaa 100644 --- a/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py +++ b/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py @@ -217,9 +217,9 @@ class AiocqhttpAdapter(Platform): for t, m_group in itertools.groupby(event.message, key=lambda x: x["type"]): a = None if t == "text": - # 合并相邻文本段 - message_str += "".join(m["data"]["text"] for m in m_group).strip() - a = ComponentTypes[t](text=message_str) # noqa: F405 + current_text = "".join(m["data"]["text"] for m in m_group).strip() + message_str += current_text + a = ComponentTypes[t](text=current_text) # noqa: F405 abm.message.append(a) elif t == "file": @@ -292,6 +292,11 @@ class AiocqhttpAdapter(Platform): for m in m_group: try: + if m["data"]["qq"] == "all": + abm.message.append(At(qq="all", name="全体成员")) + message_str += "@全体成员 " + continue + at_info = await self.bot.call_action( action="get_stranger_info", user_id=int(m["data"]["qq"]),