🐛 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:
xtaodada 2023-08-21 21:38:12 +08:00
parent 2a115d0333
commit 2ca9b559fe
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -31,7 +31,7 @@ if TYPE_CHECKING:
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*)?.*?$"