One task per user

This commit is contained in:
yasir 2023-01-28 11:47:25 +07:00
parent 1a89ecc7b5
commit 764b624536

View file

@ -45,7 +45,7 @@ async def genss(client, message):
if not DL_TASK.get(message.from_user.id):
DL_TASK[message.from_user.id] = Lock()
if DL_TASK.get(message.from_user.id):
if DL_TASK.get(message.from_user.id).unlocked:
return await process.edit("Sorry to avoid flood and error, bot only process one task at a time.")
c_time = time.time()
the_real_download_location = await replied.download(