From b29ceea72c97554b026000fa1f765be1e9ad7b93 Mon Sep 17 00:00:00 2001 From: Harshit Shrivastav <87630299+itzharshit@users.noreply.github.com> Date: Sun, 11 Jun 2023 14:33:08 +0530 Subject: [PATCH] Fixed minor bug Changed fw.x to fw.value --- main/plugins/batch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/plugins/batch.py b/main/plugins/batch.py index 2bb76d965..15b553dd8 100644 --- a/main/plugins/batch.py +++ b/main/plugins/batch.py @@ -102,10 +102,10 @@ async def run_batch(userbot, client, sender, link, _range): try: await get_bulk_msg(userbot, client, sender, link, i) except FloodWait as fw: - if int(fw.x) > 299: + if int(fw.value) > 299: await client.send_message(sender, "Cancelling batch since you have floodwait more than 5 minutes.") break - await asyncio.sleep(fw.x + 5) + await asyncio.sleep(fw.value + 5) await get_bulk_msg(userbot, client, sender, link, i) protection = await client.send_message(sender, f"Sleeping for `{timer}` seconds to avoid Floodwaits and Protect account!") await asyncio.sleep(timer)