From b6fb7e20c14fc36b9f7c57f1650a488bd8f01760 Mon Sep 17 00:00:00 2001 From: zxce3 Date: Tue, 14 Sep 2021 06:13:46 +0700 Subject: [PATCH] Revert "rm .raw file globaly" This reverts commit e8e977ce6c2aec22b74b438f7c55d450eb6619ff. --- bot/rmtrash.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bot/rmtrash.py b/bot/rmtrash.py index c07dc76..74d6b5a 100644 --- a/bot/rmtrash.py +++ b/bot/rmtrash.py @@ -5,7 +5,7 @@ from helpers.filters import command from helpers.decorators import sudo_users_only, errors downloads = os.path.realpath("bot/downloads") -raw = os.path.realpath(".") +raw = os.path.realpath("raw_files") @Client.on_message(command(["rmd", "cleardl"]) & ~filters.edited) @errors @@ -26,8 +26,7 @@ async def clear_raw(_, message: Message): ls_dir = os.listdir(raw) if ls_dir: for file in os.listdir(raw): - if file.endswith('.raw'): - os.remove(os.path.join(raw, file)) + os.remove(os.path.join(raw, file)) await message.reply_text("✅ **deleted all raw files**") else: await message.reply_text("❌ **no raw files**")