mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-12 23:40:03 +08:00
fix bug
This commit is contained in:
@@ -238,7 +238,7 @@ async def get_image(img_url: str, user_id: int) -> Optional[str]:
|
||||
TEMP_PATH / f"pix_{user_id}_{img_url[-10:-4]}.jpg", "wb"
|
||||
) as f:
|
||||
await f.write(response.content)
|
||||
return f"pix_{user_id}_{img_url[-10:-4]}.jpg"
|
||||
return TEMP_PATH / f"pix_{user_id}_{img_url[-10:-4]}.jpg"
|
||||
except TimeoutError:
|
||||
logger.warning(f"PIX:{img_url} 图片下载超时...")
|
||||
pass
|
||||
|
||||
@@ -149,11 +149,11 @@ async def _(bot: Bot, event: MessageEvent, arg: Message = CommandArg()):
|
||||
f"title:{title}\n"
|
||||
f"author:{author}\n"
|
||||
f"PID:{pid}\nUID:{uid}\n"
|
||||
f"{image(_img, 'temp')}"
|
||||
f"{image(_img)}"
|
||||
)
|
||||
)
|
||||
else:
|
||||
msg_id = await pix.send(image(_img, 'temp'))
|
||||
msg_id = await pix.send(image(_img))
|
||||
logger.info(
|
||||
f"(USER {event.user_id}, GROUP {event.group_id if isinstance(event, GroupMessageEvent) else 'private'})"
|
||||
f" 查看PIX图库PID: {pid}"
|
||||
|
||||
Reference in New Issue
Block a user