Skip to content

Commit

Permalink
Update youtube_dl_button.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Tellybots authored Mar 10, 2022
1 parent 9186d5a commit 936fc34
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion plugins/youtube_dl_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,4 +361,21 @@ async def youtube_dl_call_back(bot, update):
media=media_album_p
)


try:
shutil.rmtree(tmp_directory_for_each_user)
except:
pass
try:
os.remove(download_directory)
except:
pass
try:
os.remove(thumbnail)
except:
pass
await bot.edit_message_text(
text=Translation.AFTER_SUCCESSFUL_UPLOAD_MSG_WITH_TS.format(time_taken_for_download, time_taken_for_upload),
chat_id=update.message.chat.id,
message_id=update.message.message_id,
disable_web_page_preview=True
)

0 comments on commit 936fc34

Please sign in to comment.