From 3b149c520b5d585c8176c35e7835477b6b0266d6 Mon Sep 17 00:00:00 2001 From: HakimYu Date: Tue, 24 Jun 2025 16:30:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(AiocqhttpAdapter):=20=E4=BF=AE=E5=A4=8Dat?= =?UTF-8?q?=5Finfo.get("nick",=20"")=E7=9A=84=E9=94=99=E8=AF=AF=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E5=9C=A8message=5Fstr=E4=B8=AD=E9=92=88=E5=AF=B9At?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=B7=BB=E5=8A=A0QQ=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py b/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py index df8a00ae1..079371548 100644 --- a/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py +++ b/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py @@ -307,7 +307,7 @@ class AiocqhttpAdapter(Platform): user_id=int(m["data"]["qq"]), ) if at_info: - nickname = at_info.get("nick", "") + nickname = at_info.get("nickname", "") is_at_self = str(m["data"]["qq"]) in {abm.self_id, "all"} abm.message.append( @@ -322,7 +322,7 @@ class AiocqhttpAdapter(Platform): first_at_self_processed = True else: # 非第一个@机器人或@其他用户,添加到message_str - message_str += f" @{nickname} " + message_str += f" @{nickname}({m['data']['qq']}) " else: abm.message.append(At(qq=str(m["data"]["qq"]), name="")) except ActionFailed as e: