Skip to content

Commit

Permalink
Update batch.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vasusen-code committed May 28, 2023
1 parent 5f2af1c commit 17a05b9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main/plugins/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@

batch = []

@Drone.on(events.NewMessage(incoming=True, pattern='/cancel'))
async def cancel(event):
if not event.sender_id in batch:
return await event.reply("No batch active.")
batch.clear()
await event.reply("Done.")

@Drone.on(events.NewMessage(incoming=True, from_users=AUTH, pattern='/batch'))
async def _batch(event):
if not event.is_private:
Expand Down

0 comments on commit 17a05b9

Please sign in to comment.