From aa67b595408952583351e26f5d1d7eec96652c66 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 27 May 2025 14:53:17 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20=E8=87=AA=E5=8A=A8=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chat/utils/utils.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/chat/utils/utils.py b/src/chat/utils/utils.py index 0501e4362..2c183934a 100644 --- a/src/chat/utils/utils.py +++ b/src/chat/utils/utils.py @@ -63,9 +63,7 @@ def is_mentioned_bot_in_message(message: MessageRecv) -> tuple[bool, float]: ) # 判断是否被@ - if re.search( - rf"@<(.+?):{global_config.bot.qq_account}>" - ): + if re.search(rf"@<(.+?):{global_config.bot.qq_account}>"): is_at = True is_mentioned = True @@ -78,7 +76,8 @@ def is_mentioned_bot_in_message(message: MessageRecv) -> tuple[bool, float]: if re.match( rf"\[回复 (.+?)\({str(global_config.bot.qq_account)}\):(.+?)\],说:", message.processed_plain_text ) or re.match( - rf"\[回复<(.+?)(?=:{str(global_config.bot.qq_account)}>)\:{str(global_config.bot.qq_account)}>:(.+?)\],说:", message.processed_plain_text + rf"\[回复<(.+?)(?=:{str(global_config.bot.qq_account)}>)\:{str(global_config.bot.qq_account)}>:(.+?)\],说:", + message.processed_plain_text, ): is_mentioned = True else: