Skip to content

Update batch.py #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
12 changes: 6 additions & 6 deletions main/plugins/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def _batch(event):
return conv.cancel()
try:
value = int(_range.text)
if value > 100:
if value > 2000:
await conv.send_message("You can only get upto 100 files in a single batch.")
return conv.cancel()
except ValueError:
Expand All @@ -79,18 +79,18 @@ async def _batch(event):

async def run_batch(userbot, client, sender, link, _range):
for i in range(_range):
timer = 60
timer = 10
if i < 25:
timer = 5
timer = 10
if i < 50 and i > 25:
timer = 10
if i < 100 and i > 50:
timer = 15
timer = 10
if not 't.me/c/' in link:
if i < 25:
timer = 2
timer = 10
else:
timer = 3
timer = 10
try:
if not sender in batch:
await client.send_message(sender, "Batch completed.")
Expand Down