🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -64,16 +64,16 @@ def is_mentioned_bot_in_message(message: MessageRecv) -> tuple[bool, float]:
|
|||||||
|
|
||||||
if global_config.bot.nickname in message.processed_plain_text:
|
if global_config.bot.nickname in message.processed_plain_text:
|
||||||
is_mentioned = True
|
is_mentioned = True
|
||||||
|
|
||||||
for alias_name in global_config.bot.alias_names:
|
for alias_name in global_config.bot.alias_names:
|
||||||
if alias_name in message.processed_plain_text:
|
if alias_name in message.processed_plain_text:
|
||||||
is_mentioned = True
|
is_mentioned = True
|
||||||
|
|
||||||
# 判断是否被@
|
# 判断是否被@
|
||||||
if re.search(rf"@<(.+?):{global_config.bot.qq_account}>", message.processed_plain_text):
|
if re.search(rf"@<(.+?):{global_config.bot.qq_account}>", message.processed_plain_text):
|
||||||
is_at = True
|
is_at = True
|
||||||
is_mentioned = True
|
is_mentioned = True
|
||||||
|
|
||||||
# print(f"message.processed_plain_text: {message.processed_plain_text}")
|
# print(f"message.processed_plain_text: {message.processed_plain_text}")
|
||||||
# print(f"is_mentioned: {is_mentioned}")
|
# print(f"is_mentioned: {is_mentioned}")
|
||||||
# print(f"is_at: {is_at}")
|
# print(f"is_at: {is_at}")
|
||||||
|
|||||||
Reference in New Issue
Block a user