parent
071f8b15e1
commit
b6fb7e20c1
@ -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**")
|
||||
|
Loading…
Reference in New Issue
Block a user