From ffc12b704dc19896d19efbb263e4b35c0b203fdd Mon Sep 17 00:00:00 2001 From: AS TG <126592884+TGxIRFAN@users.noreply.github.com> Date: Mon, 12 Feb 2024 10:10:03 +0530 Subject: [PATCH] fixed floodwait when indexing! --- plugins/index.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/index.py b/plugins/index.py index df5cf1004..2195786ad 100644 --- a/plugins/index.py +++ b/plugins/index.py @@ -158,6 +158,7 @@ async def index_files_to_db(lst_msg_id, chat, msg, bot): reply_markup=reply) if message.empty: deleted += 1 + await asyncio.sleep(0.1) continue elif not message.media: no_media += 1 @@ -172,6 +173,7 @@ async def index_files_to_db(lst_msg_id, chat, msg, bot): media.file_type = message.media.value media.caption = message.caption aynav, vnay = await save_file(media) + await asyncio.sleep(0.1) if aynav: total_files += 1 elif vnay == 0: