fix(discord-cross): 修复跨平台消息处理和附件下载问题
修复QQ群消息处理中的非群消息过滤问题 优化Discord附件下载逻辑,使用aiohttp替代requests 修复Redis订阅任务重复创建问题 调整消息格式化的embed字段处理逻辑
This commit is contained in:
@@ -327,13 +327,14 @@ async def format_qq_to_discord_content(
|
||||
"name": f"{qq_nickname}",
|
||||
"icon_url": f"https://q1.qlogo.cn/g?b=qq&nk={qq_user_id}&s=640"
|
||||
},
|
||||
"description": content if content else "",
|
||||
"timestamp": None,
|
||||
"footer": {
|
||||
"text": f"来自 QQ"
|
||||
}
|
||||
}
|
||||
|
||||
if content:
|
||||
embed["description"] = content
|
||||
|
||||
if attachments:
|
||||
image_urls = []
|
||||
voice_urls = []
|
||||
@@ -364,7 +365,10 @@ async def format_qq_to_discord_content(
|
||||
filtered_attachments.append(att)
|
||||
|
||||
attachments = filtered_attachments
|
||||
embed["description"] = content if content else ""
|
||||
if content:
|
||||
embed["description"] = content
|
||||
elif "description" not in embed:
|
||||
embed["description"] = ""
|
||||
|
||||
if image_urls:
|
||||
embed["image"] = {"url": image_urls[0]}
|
||||
|
||||
Reference in New Issue
Block a user