From 1e1a103882b92dd530b2e87bf975beeae5125570 Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Thu, 11 Apr 2024 03:26:12 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20aiocqhttp=E5=85=81=E8=AE=B8=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=9B=BE=E7=89=87=E9=93=BE=E6=8E=A5=E4=BD=9C=E4=B8=BA?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/platform/sources/aiocqhttp.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/platform/sources/aiocqhttp.py b/pkg/platform/sources/aiocqhttp.py index f17a2016..8253159c 100644 --- a/pkg/platform/sources/aiocqhttp.py +++ b/pkg/platform/sources/aiocqhttp.py @@ -30,7 +30,14 @@ def yiri2target(message_chain: mirai.MessageChain) -> typing.Tuple[list, int, da 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: