mirror of https://github.com/Mai-with-u/MaiBot.git
启动不报错
parent
feac1f6dc3
commit
7e23d52b8d
|
|
@ -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_at = True
|
||||||
is_mentioned = True
|
is_mentioned = True
|
||||||
|
|
||||||
|
|
@ -75,7 +75,7 @@ def is_mentioned_bot_in_message(message: MessageRecv) -> tuple[bool, float]:
|
||||||
if not is_mentioned:
|
if not is_mentioned:
|
||||||
# 判断是否被回复
|
# 判断是否被回复
|
||||||
if re.match(
|
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
|
is_mentioned = True
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue