mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-12 15:30:04 +08:00
🎨 message-build判断优化
This commit is contained in:
@@ -63,7 +63,7 @@ class MessageUtils:
|
|||||||
elif isinstance(msg, str):
|
elif 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"):
|
elif msg.startswith("http://"):
|
||||||
message_list.append(Image(url=msg))
|
message_list.append(Image(url=msg))
|
||||||
else:
|
else:
|
||||||
message_list.append(Text(msg))
|
message_list.append(Text(msg))
|
||||||
|
|||||||
Reference in New Issue
Block a user