mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-26 03:44:58 +08:00
feat: aiocqhttp允许使用图片链接作为参数
This commit is contained in:
@@ -30,7 +30,14 @@ class AiocqhttpMessageConverter(adapter.MessageConverter):
|
|||||||
msg_id = msg.id
|
msg_id = msg.id
|
||||||
msg_time = msg.time
|
msg_time = msg.time
|
||||||
elif type(msg) is mirai.Image:
|
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:
|
elif type(msg) is mirai.At:
|
||||||
msg_list.append(aiocqhttp.MessageSegment.at(msg.target))
|
msg_list.append(aiocqhttp.MessageSegment.at(msg.target))
|
||||||
elif type(msg) is mirai.AtAll:
|
elif type(msg) is mirai.AtAll:
|
||||||
|
|||||||
Reference in New Issue
Block a user