Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions main/plugins/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down