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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user