fix(youtubedownloader): fixed erroring when deleting a downloaded file
All checks were successful
Pylint / Pylint (3.10) (push) Successful in 53s
All checks were successful
Pylint / Pylint (3.10) (push) Successful in 53s
This commit is contained in:
parent
85585d4988
commit
f3fd4a8311
1 changed files with 1 additions and 1 deletions
|
@ -120,7 +120,7 @@ class YouTubeDownloader(commands.Cog):
|
|||
file.close()
|
||||
if delete is True or await self.bot.is_owner(ctx.author) is False:
|
||||
if output[1] is False:
|
||||
os.remove(output)
|
||||
os.remove(output[0])
|
||||
await complete_message.edit(content="YouTube Downloader completed!\nFile has been deleted.\nDownloaded file:")
|
||||
if output[1] is True:
|
||||
await complete_message.edit(content="YouTube Downloader completed!\nFile has not been deleted, as it was previously downloaded and saved.\nDownloaded file:")
|
||||
|
|
Loading…
Reference in a new issue