diff --git a/misskaty/__init__.py b/misskaty/__init__.py index f1269f88..a113e586 100644 --- a/misskaty/__init__.py +++ b/misskaty/__init__.py @@ -12,6 +12,7 @@ basicConfig( MOD_LOAD = [] MOD_NOLOAD = [] HELPABLE = {} +cleanmode = {} botStartTime = time.time() # Pyrogram Bot Client diff --git a/utils.py b/utils.py index e58dd95a..9c881f34 100644 --- a/utils.py +++ b/utils.py @@ -12,7 +12,7 @@ import os import emoji from database.users_chats_db import db from database.afk_db import is_cleanmode_on -from misskaty import app +from misskaty import app, cleanmode LOGGER = getLogger(__name__) BANNED = {} @@ -40,7 +40,7 @@ async def auto_clean(): try: await app.delete_messages(chat_id, x["msg_id"]) except FloodWait as e: - await asyncio.sleep(e.x) + await asyncio.sleep(e.value) except: continue else: