feat: aiocqhttp允许使用图片链接作为参数

This commit is contained in:
RockChinQ
2024-04-11 03:26:12 +00:00
parent e5cffb7c9b
commit 1e1a103882

View File

@@ -30,7 +30,14 @@ class AiocqhttpMessageConverter(adapter.MessageConverter):
msg_id = msg.id
msg_time = msg.time
elif type(msg) is mirai.Image:
msg_list.append(aiocqhttp.MessageSegment.image(msg.path))
arg = ''
if msg.url:
arg = msg.url
elif msg.path:
arg = msg.path
msg_list.append(aiocqhttp.MessageSegment.image(arg))
elif type(msg) is mirai.At:
msg_list.append(aiocqhttp.MessageSegment.at(msg.target))
elif type(msg) is mirai.AtAll: