mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-19 09:38:21 +08:00
🐛 fix invalid cq code catched
This commit is contained in:
parent
e4377faa67
commit
a63a5fea3c
@ -213,7 +213,7 @@ class Message(BaseMessage):
|
||||
for cqcode in re.finditer(
|
||||
r"\[CQ:(?P<type>[a-zA-Z0-9-_.]+)"
|
||||
r"(?P<params>"
|
||||
r"(?:,[a-zA-Z0-9-_.]+=?[^,\]]*)*"
|
||||
r"(?:,[a-zA-Z0-9-_.]+=[^,\]]+))*"
|
||||
r"),?\]", msg):
|
||||
yield "text", unescape(msg[text_begin:cqcode.pos +
|
||||
cqcode.start()])
|
||||
|
@ -4,6 +4,10 @@ sidebar: auto
|
||||
|
||||
# 更新日志
|
||||
|
||||
## v2.0.0a8
|
||||
|
||||
- 修复部分非法 CQ 码被识别导致报错
|
||||
|
||||
## v2.0.0a7
|
||||
|
||||
- 修复 cqhttp 检查 to me 时出现 IndexError
|
||||
|
Loading…
Reference in New Issue
Block a user