Skip to content

Commit

Permalink
Fix for index err; sleep to avoid floodwait
Browse files Browse the repository at this point in the history
  • Loading branch information
yashoswalyo authored Jun 8, 2022
1 parent 81a1455 commit 3f4fce2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ async def broadcast_handler(c: Client, m: Message):
except PeerIdInvalid:
await database.deleteUser(userList[i]["_id"])
LOGGER.info(f"{userList[i]['_id']} - {userList[i]['name']} : user id invalid\n")
except Exception as e:
LOGGER.info(f"{userList[i]['_id']} - {userList[i]['name']} : {e}\n")
await asyncio.sleep(3)
except Exception as err:
LOGGER.warning(f"{err}\n")
await asyncio.sleep(3)
await status.edit_text(
text=BROADCAST_MSG.format(len, success)
+ f"**Failed: {str(len-success)}**\n\n__🤓 Broadcast completed sucessfully__",
Expand Down

0 comments on commit 3f4fce2

Please sign in to comment.