mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-31 23:51:28 +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(
|
for cqcode in re.finditer(
|
||||||
r"\[CQ:(?P<type>[a-zA-Z0-9-_.]+)"
|
r"\[CQ:(?P<type>[a-zA-Z0-9-_.]+)"
|
||||||
r"(?P<params>"
|
r"(?P<params>"
|
||||||
r"(?:,[a-zA-Z0-9-_.]+=?[^,\]]*)*"
|
r"(?:,[a-zA-Z0-9-_.]+=[^,\]]+))*"
|
||||||
r"),?\]", msg):
|
r"),?\]", msg):
|
||||||
yield "text", unescape(msg[text_begin:cqcode.pos +
|
yield "text", unescape(msg[text_begin:cqcode.pos +
|
||||||
cqcode.start()])
|
cqcode.start()])
|
||||||
|
@ -4,6 +4,10 @@ sidebar: auto
|
|||||||
|
|
||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
## v2.0.0a8
|
||||||
|
|
||||||
|
- 修复部分非法 CQ 码被识别导致报错
|
||||||
|
|
||||||
## v2.0.0a7
|
## v2.0.0a7
|
||||||
|
|
||||||
- 修复 cqhttp 检查 to me 时出现 IndexError
|
- 修复 cqhttp 检查 to me 时出现 IndexError
|
||||||
|
Loading…
x
Reference in New Issue
Block a user