🐛 Fix incorrect matching with commands containing @

Resolved the issue where commands with an '@' symbol, such as "/abyss@MasterBot", were not being matched correctly due to the regular expression pattern. The pattern has been updated to handle such cases.
This commit is contained in:
luoshuijs 2023-08-20 20:43:58 +08:00 committed by GitHub
parent 2cc1d98a2d
commit 5c26a65c58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@ except ImportError:
import json as jsonlib
TZ = timezone("Asia/Shanghai")
cmd_pattern = r"(?i)^/abyss\s*((?:\d+)|(?:all))?\s*(pre)?"
cmd_pattern = r"(?i)^/abyss(?:@[\w]+)?\s*((?:\d+)|(?:all))?\s*(pre)?"
msg_pattern = r"^深渊数据((?:查询)|(?:总览))(上期)?\D?(\d*)?.*?$"
regex_01 = r"['\"]icon['\"]:\s*['\"](.*?)['\"]"