mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-Nonebot.git
synced 2026-04-01 22:04:51 +00:00
fix(touch): 修复头像缓存问题
- 下载 QQ头像后立即删除,防止缓存 - 优化了触碰功能中的头像处理流程
This commit is contained in:
parent
ce18d17f4b
commit
942b7f257c
1 changed files with 3 additions and 1 deletions
|
|
@ -24,8 +24,10 @@ async def handle_touch(message: MessageEvent):
|
||||||
result = await QrTouch.touch(0)
|
result = await QrTouch.touch(0)
|
||||||
q.reply_touch_content = result.reply_touch_content
|
q.reply_touch_content = result.reply_touch_content
|
||||||
await QrTouchLog.insert_touch_log(q, member_openid)
|
await QrTouchLog.insert_touch_log(q, member_openid)
|
||||||
local_gif = rua(await download_qq_image_by_account(None)).add_gif()
|
qq_head_image = await download_qq_image_by_account(None)
|
||||||
|
local_gif = rua(qq_head_image).add_gif()
|
||||||
msg = Message([MessageSegment.file_image(Path(local_gif)),
|
msg = Message([MessageSegment.file_image(Path(local_gif)),
|
||||||
MessageSegment.text(result.reply_touch_content),])
|
MessageSegment.text(result.reply_touch_content),])
|
||||||
|
await delete_file(qq_head_image)
|
||||||
await delete_file(local_gif)
|
await delete_file(local_gif)
|
||||||
await to.finish(msg)
|
await to.finish(msg)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue