🐛 fix missing bool to str convert in cqhttp message segment

This commit is contained in:
yanyongyu 2021-05-02 14:24:12 +08:00
parent fa73c13800
commit 884a7b966f

View File

@ -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":