Update src/chat/utils/utils.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
zrzluck99
2025-05-27 22:22:15 +08:00
committed by GitHub
parent 43be52a2b3
commit e25755118e

View File

@@ -64,9 +64,7 @@ def is_mentioned_bot_in_message(message: MessageRecv) -> tuple[bool, float]:
# 判断是否被@ # 判断是否被@
if re.search( if re.search(
rf"@(.+?)id:{global_config.bot.qq_account}", message.processed_plain_text rf"@<(.+?):{global_config.bot.qq_account}>"
) or re.search(
rf"@<(.+?)(?=:{global_config.bot.qq_account}>)\:{global_config.bot.qq_account}>", message.processed_plain_text
): ):
is_at = True is_at = True
is_mentioned = True is_mentioned = True