mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
⚡ 移除build_message的https默认转图片
This commit is contained in:
parent
5b84ef9a08
commit
a43564c102
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -16,6 +16,7 @@
|
|||||||
"jsdelivr",
|
"jsdelivr",
|
||||||
"kaiheila",
|
"kaiheila",
|
||||||
"lolicon",
|
"lolicon",
|
||||||
|
"Mahiro",
|
||||||
"nonebot",
|
"nonebot",
|
||||||
"onebot",
|
"onebot",
|
||||||
"pixiv",
|
"pixiv",
|
||||||
@ -24,9 +25,9 @@
|
|||||||
"tobytes",
|
"tobytes",
|
||||||
"ujson",
|
"ujson",
|
||||||
"unban",
|
"unban",
|
||||||
|
"Uninfo",
|
||||||
"userinfo",
|
"userinfo",
|
||||||
"zhenxun",
|
"zhenxun"
|
||||||
"jsdelivr"
|
|
||||||
],
|
],
|
||||||
"python.analysis.autoImportCompletions": true,
|
"python.analysis.autoImportCompletions": true,
|
||||||
"python.testing.pytestArgs": ["tests"],
|
"python.testing.pytestArgs": ["tests"],
|
||||||
|
|||||||
@ -64,8 +64,6 @@ class MessageUtils:
|
|||||||
if isinstance(msg, str):
|
if isinstance(msg, str):
|
||||||
if msg.startswith("base64://"):
|
if msg.startswith("base64://"):
|
||||||
message_list.append(Image(raw=BytesIO(base64.b64decode(msg[9:]))))
|
message_list.append(Image(raw=BytesIO(base64.b64decode(msg[9:]))))
|
||||||
elif msg.startswith(("http://", "https://")):
|
|
||||||
message_list.append(Image(url=msg))
|
|
||||||
else:
|
else:
|
||||||
message_list.append(Text(msg))
|
message_list.append(Text(msg))
|
||||||
elif isinstance(msg, int | float):
|
elif isinstance(msg, int | float):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user