From 7e23d52b8d95db05bd46daefe3690ab4bfa9f39d Mon Sep 17 00:00:00 2001 From: Bakadax Date: Wed, 14 May 2025 20:39:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E4=B8=8D=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chat/utils/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chat/utils/utils.py b/src/chat/utils/utils.py index 2bb8da60..23ebe64e 100644 --- a/src/chat/utils/utils.py +++ b/src/chat/utils/utils.py @@ -64,7 +64,7 @@ def is_mentioned_bot_in_message(message: MessageRecv) -> tuple[bool, float]: ) # 判断是否被@ - if re.search(f"@[\s\S]*?(id:{global_config.BOT_QQ})", message.processed_plain_text): + if re.search(f"@[\\s\\S]*?(id:{global_config.BOT_QQ})", message.processed_plain_text): is_at = True is_mentioned = True @@ -75,7 +75,7 @@ def is_mentioned_bot_in_message(message: MessageRecv) -> tuple[bool, float]: if not is_mentioned: # 判断是否被回复 if re.match( - f"\[回复 [\s\S]*?\({str(global_config.BOT_QQ)}\):[\s\S]*?],说:", message.processed_plain_text + f"\\[回复 [\\s\\S]*?\\({str(global_config.BOT_QQ)}\\):[\\s\\S]*?\\],说:", message.processed_plain_text ): is_mentioned = True else: