40 try:
41 await bot(functions.channels.EditBannedRequest(event.chat_id, i, rights))
42 except FloodWaitError as ex:
43 logger.warn("sleeping for {} seconds".format(ex.seconds)) 44 sleep(ex.seconds)
45 except Exception as ex:
46 await event.edit(str(ex))
The method is marked as deprecated and will be removed in a future version of Python. Consider looking for an alternative in the documentation.