mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-24 11:07:14 +00:00
fix: QQ 官方 API 图片识别功能不正常 (#825)
This commit is contained in:
@@ -198,7 +198,6 @@ class OfficialMessageConverter(adapter_model.MessageConverter):
|
|||||||
bot_account_id: int = 0,
|
bot_account_id: int = 0,
|
||||||
) -> mirai.MessageChain:
|
) -> mirai.MessageChain:
|
||||||
yiri_msg_list = []
|
yiri_msg_list = []
|
||||||
|
|
||||||
# 存id
|
# 存id
|
||||||
|
|
||||||
yiri_msg_list.append(
|
yiri_msg_list.append(
|
||||||
@@ -218,7 +217,7 @@ class OfficialMessageConverter(adapter_model.MessageConverter):
|
|||||||
yiri_msg_list.append(mirai.At(target=mention.id))
|
yiri_msg_list.append(mirai.At(target=mention.id))
|
||||||
|
|
||||||
for attachment in message.attachments:
|
for attachment in message.attachments:
|
||||||
if attachment.content_type == "image":
|
if attachment.content_type.startswith("image"):
|
||||||
yiri_msg_list.append(mirai.Image(url=attachment.url))
|
yiri_msg_list.append(mirai.Image(url=attachment.url))
|
||||||
else:
|
else:
|
||||||
logging.warning(
|
logging.warning(
|
||||||
|
|||||||
Reference in New Issue
Block a user