mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
修复图库内图片无法被连续删除的问题
This commit is contained in:
parent
27b89b333a
commit
57a7903c63
@ -65,8 +65,8 @@ async def arg_handle(
|
|||||||
if int(img_id) > max_id or int(img_id) < 0:
|
if int(img_id) > max_id or int(img_id) < 0:
|
||||||
await delete_img.finish(f"Id超过上下限,上限:{max_id}", at_sender=True)
|
await delete_img.finish(f"Id超过上下限,上限:{max_id}", at_sender=True)
|
||||||
try:
|
try:
|
||||||
if (TEMP_PATH / "delete.jpg").exists():
|
if (TEMP_PATH / f"{event.user_id}_delete.jpg").exists():
|
||||||
(TEMP_PATH / "delete.jpg").unlink()
|
(TEMP_PATH / f"{event.user_id}_delete.jpg").unlink()
|
||||||
logger.info(f"删除{cn2py(state['path'])}图片 {img_id}.jpg 成功")
|
logger.info(f"删除{cn2py(state['path'])}图片 {img_id}.jpg 成功")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(f"删除图片 delete.jpg 失败 e{e}")
|
logger.warning(f"删除图片 delete.jpg 失败 e{e}")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user