移除build_message的https默认转图片

This commit is contained in:
HibiKier 2025-04-01 13:03:33 +08:00
parent 5b84ef9a08
commit a43564c102
2 changed files with 3 additions and 4 deletions

View File

@ -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"],

View File

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