Revert "rm .raw file globaly"

This reverts commit e8e977ce6c.
This commit is contained in:
zxce3 2021-09-14 06:13:46 +07:00
parent 071f8b15e1
commit b6fb7e20c1

View File

@ -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**")