diff --git a/plugins/youtube_dl_button.py b/plugins/youtube_dl_button.py index a06c8d1..d1941d2 100644 --- a/plugins/youtube_dl_button.py +++ b/plugins/youtube_dl_button.py @@ -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 + )