mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-22 00:35:37 +00:00
ytdl fix a bug
This commit is contained in:
parent
57c234eb7d
commit
fb62e4d654
@ -82,13 +82,14 @@ async def start_download(message: Message, url: str):
|
||||
except Exception as e:
|
||||
result["status"] = False
|
||||
result["error"] = str(e)
|
||||
if not result["status"]:
|
||||
else:
|
||||
with contextlib.suppress(Exception):
|
||||
await message.edit(f"下载/发送文件失败,发生错误:{result['error']}")
|
||||
ytdl_is_downloading = False
|
||||
with contextlib.suppress(Exception):
|
||||
shutil.rmtree("data/ytdl")
|
||||
await message.safe_delete()
|
||||
if result["status"]:
|
||||
await message.safe_delete()
|
||||
|
||||
|
||||
@listener(command="ytdl",
|
||||
|
Loading…
Reference in New Issue
Block a user