From 6cbece5c9e974fa9b282543acd682b0c6f56a274 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Sat, 12 Feb 2022 11:43:23 +0700 Subject: [PATCH] unused --- program/rmtrash | 52 ------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 program/rmtrash diff --git a/program/rmtrash b/program/rmtrash deleted file mode 100644 index b5e8ff1..0000000 --- a/program/rmtrash +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (C) 2021 By VeezMusicProject - -import os -from pyrogram import Client, filters -from pyrogram.types import Message -from driver.filters import command, other_filters -from driver.decorators import sudo_users_only, errors - -downloads = os.path.realpath("program/downloads") -raw = os.path.realpath(".") - -@Client.on_message(command(["rmd", "clear"]) & ~filters.edited) -@errors -@sudo_users_only -async def clear_downloads(_, message: Message): - ls_dir = os.listdir(downloads) - if ls_dir: - for file in os.listdir(downloads): - os.remove(os.path.join(downloads, file)) - await message.reply_text("✅ **deleted all downloaded files**") - else: - await message.reply_text("❌ **no files downloaded**") - - -@Client.on_message(command(["rmw", "clean"]) & ~filters.edited) -@errors -@sudo_users_only -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)) - await message.reply_text("✅ **deleted all raw files**") - else: - await message.reply_text("❌ **no raw files found**") - - -@Client.on_message(command(["cleanup"]) & ~filters.edited) -@errors -@sudo_users_only -async def cleanup(_, message: Message): - pth = os.path.realpath(".") - ls_dir = os.listdir(pth) - if ls_dir: - for dta in os.listdir(pth): - os.system("rm -rf *.raw *.jpg") - await message.reply_text("✅ **cleaned**") - else: - await message.reply_text("✅ **already cleaned**") - -# this module has deactivated because no longer used if you want to take the code just take it and use it, Thanks