Fix broadcast FloodWait

Signed-off-by: Yasir Aris M <git@yasir.id>
This commit is contained in:
Yasir Aris M 2025-01-29 11:28:07 +07:00 committed by GitHub
parent dd51947091
commit f59933a767
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,7 +72,7 @@ async def broadcast_messages(user_id, message):
await message.copy(chat_id=user_id)
return True, "Succes"
except FloodWait as e:
await asyncio.sleep(e.x)
await asyncio.sleep(e.value)
return await broadcast_messages(user_id, message)
except InputUserDeactivated:
await db.delete_user(int(user_id))