mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
One task per user
This commit is contained in:
parent
2b46d06a48
commit
5e80d07e3d
1 changed files with 5 additions and 4 deletions
|
|
@ -41,11 +41,12 @@ async def genss(client, message):
|
|||
if media is None:
|
||||
return await message.reply("Reply to a Telegram Video or document as video to generate screenshoot!")
|
||||
process = await message.reply_text("`Processing, please wait..`")
|
||||
if not DL_TASK.get(message.from_user.id):
|
||||
DL_TASK[message.from_user.id] = True
|
||||
|
||||
if DL_TASK.get(message.from_user.id) == True:
|
||||
if DL_TASK.get(message.from_user.id):
|
||||
return await process.edit("Sorry to avoid flood and error, bot only process one task at a time.")
|
||||
|
||||
if not DL_TASK.get(message.from_user.id):
|
||||
DL_TASK[message.from_user.id] = 1
|
||||
|
||||
c_time = time.time()
|
||||
the_real_download_location = await replied.download(
|
||||
progress=progress_for_pyrogram,
|
||||
|
|
|
|||
Loading…
Reference in a new issue