mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 12:02:16 +00:00
🐛 Fix incorrect matching with commands containing @
Resolved the issue where commands with an '@' symbol, such as "/challenge@HonkaiStarRail_ZH_Bot", were not being matched correctly due to the regular expression pattern. The pattern has been updated to handle such cases. Co-authored-by: luoshuijs <luoshuijs@outlook.com>
This commit is contained in:
parent
2a115d0333
commit
2ca9b559fe
@ -31,7 +31,7 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
|
|
||||||
TZ = timezone("Asia/Shanghai")
|
TZ = timezone("Asia/Shanghai")
|
||||||
cmd_pattern = r"(?i)^/challenge\s*((?:\d+)|(?:all))?\s*(pre)?"
|
cmd_pattern = r"(?i)^/challenge(?:@[\w]+)?\s*((?:\d+)|(?:all))?\s*(pre)?"
|
||||||
msg_pattern = r"^混沌回忆数据((?:查询)|(?:总览))(上期)?\D?(\d*)?.*?$"
|
msg_pattern = r"^混沌回忆数据((?:查询)|(?:总览))(上期)?\D?(\d*)?.*?$"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user