I develop telegram bot using python-telegram-bot.
Despite the usage of MessageQueue (just as mentioned in the docs) I keep getting
telegram.error.RetryAfter: Flood control exceeded. Retry in N seconds
when I flooding from the client (by pressing reply keyboard buttons really-really quickly) to my bot and it answers me.
MessageQueue actually works, I can see the delay during sending big number of messages at once (with for loop). I've tried different values for message queue but none of those helped.
Seems like the bot gets ban from telegram regardless of number of messages it actually send.
Method threading (sync or async) does not change anything. How can I prevent users from flooding or avoid banning my bot when this is happening?