mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 07:28:10 +08:00
🐛 fix missing bool to str convert in cqhttp message segment
This commit is contained in:
parent
fa73c13800
commit
884a7b966f
@ -88,8 +88,8 @@ class MessageSegment(BaseMessageSegment):
|
|||||||
"image", {
|
"image", {
|
||||||
"file": file,
|
"file": file,
|
||||||
"type": type_,
|
"type": type_,
|
||||||
"cache": cache,
|
"cache": _b2s(cache),
|
||||||
"proxy": proxy,
|
"proxy": _b2s(proxy),
|
||||||
"timeout": timeout
|
"timeout": timeout
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -157,8 +157,8 @@ class MessageSegment(BaseMessageSegment):
|
|||||||
"record", {
|
"record", {
|
||||||
"file": file,
|
"file": file,
|
||||||
"magic": _b2s(magic),
|
"magic": _b2s(magic),
|
||||||
"cache": cache,
|
"cache": _b2s(cache),
|
||||||
"proxy": proxy,
|
"proxy": _b2s(proxy),
|
||||||
"timeout": timeout
|
"timeout": timeout
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -195,12 +195,13 @@ class MessageSegment(BaseMessageSegment):
|
|||||||
cache: Optional[bool] = None,
|
cache: Optional[bool] = None,
|
||||||
proxy: Optional[bool] = None,
|
proxy: Optional[bool] = None,
|
||||||
timeout: Optional[int] = None) -> "MessageSegment":
|
timeout: Optional[int] = None) -> "MessageSegment":
|
||||||
return MessageSegment("video", {
|
return MessageSegment(
|
||||||
"file": file,
|
"video", {
|
||||||
"cache": cache,
|
"file": file,
|
||||||
"proxy": proxy,
|
"cache": _b2s(cache),
|
||||||
"timeout": timeout
|
"proxy": _b2s(proxy),
|
||||||
})
|
"timeout": timeout
|
||||||
|
})
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def xml(data: str) -> "MessageSegment":
|
def xml(data: str) -> "MessageSegment":
|
||||||
|
Loading…
Reference in New Issue
Block a user