From e3271e354b9a820ff3744bf4056f0952f5ba01ab Mon Sep 17 00:00:00 2001 From: Bakadax Date: Tue, 22 Apr 2025 11:03:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=9C=E5=91=9C~=E8=AE=A8=E5=8E=8C=E6=AD=A3?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/chat/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/chat/utils.py b/src/plugins/chat/utils.py index 55d6f62b3..271386ff5 100644 --- a/src/plugins/chat/utils.py +++ b/src/plugins/chat/utils.py @@ -83,7 +83,7 @@ def is_mentioned_bot_in_message(message: MessageRecv) -> tuple[bool, float]: else: # 判断内容中是否被提及 message_content = re.sub(r"@[\s\S]*?((\d+))", "", message.processed_plain_text) - message_content = re.sub(r"\[回复 [\s\S]*?\((\d+)|未知id\):[\s\S]*?\],说:", "", message_content) + message_content = re.sub(r"\[回复 [\s\S]*?\(((\d+)|未知id)\):[\s\S]*?\],说:", "", message_content) for keyword in keywords: if keyword in message_content: is_mentioned = True