From 03d53281a9422ae7083ce847dd709c16c63e46c3 Mon Sep 17 00:00:00 2001 From: zxce3 Date: Tue, 14 Sep 2021 15:56:12 +0700 Subject: [PATCH] fix --- bot/__main__.py | 16 ++++++++-------- bot/rmtrash.py | 5 +++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/bot/__main__.py b/bot/__main__.py index 37a07b0..713c68c 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -66,11 +66,11 @@ if __name__ == '__main__': loop.run_until_complete(start()) -bot.start() -print("[STATUS]:✅ »» BOT CLIENT STARTED ««") -app.start() -print("[STATUS]:✅ »» USERBOT CLIENT STARTED ««") -call_py.start() -print("[STATUS]:✅ »» PYTGCALLS CLIENT STARTED ««") -idle() -print("[STATUS]:❌ »» BOT STOPPED ««") +# bot.start() +# print("[STATUS]:✅ »» BOT CLIENT STARTED ««") +# app.start() +# print("[STATUS]:✅ »» USERBOT CLIENT STARTED ««") +# call_py.start() +# print("[STATUS]:✅ »» PYTGCALLS CLIENT STARTED ««") +# idle() +# print("[STATUS]:❌ »» BOT STOPPED ««") diff --git a/bot/rmtrash.py b/bot/rmtrash.py index 07b50a9..7a52e6f 100644 --- a/bot/rmtrash.py +++ b/bot/rmtrash.py @@ -7,7 +7,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_files") +raw = os.path.realpath(".") @Client.on_message(command(["rmd", "cleardl"]) & ~filters.edited) @errors @@ -28,7 +28,8 @@ async def clear_raw(_, message: Message): ls_dir = os.listdir(raw) if ls_dir: for file in os.listdir(raw): - os.remove(os.path.join(raw, file)) + if file.endswith('.raw'): + os.remove(os.path.join(raw, file)) await message.reply_text("✅ **deleted all raw files**") else: await message.reply_text("❌ **no raw files**")