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",
|
||||
"kaiheila",
|
||||
"lolicon",
|
||||
"Mahiro",
|
||||
"nonebot",
|
||||
"onebot",
|
||||
"pixiv",
|
||||
@ -24,9 +25,9 @@
|
||||
"tobytes",
|
||||
"ujson",
|
||||
"unban",
|
||||
"Uninfo",
|
||||
"userinfo",
|
||||
"zhenxun",
|
||||
"jsdelivr"
|
||||
"zhenxun"
|
||||
],
|
||||
"python.analysis.autoImportCompletions": true,
|
||||
"python.testing.pytestArgs": ["tests"],
|
||||
|
||||
@ -64,8 +64,6 @@ class MessageUtils:
|
||||
if isinstance(msg, str):
|
||||
if msg.startswith("base64://"):
|
||||
message_list.append(Image(raw=BytesIO(base64.b64decode(msg[9:]))))
|
||||
elif msg.startswith(("http://", "https://")):
|
||||
message_list.append(Image(url=msg))
|
||||
else:
|
||||
message_list.append(Text(msg))
|
||||
elif isinstance(msg, int | float):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user