Currently (29f6dc4), the inline reply via update.callback_query.answer can't always be send. This happens on extreme spamming of inline keyboard buttons, e.g. when a user clicks on an inline button more than appr. ten times a second. A AfterReply exception will be raised, because the bot always tries to reply. And the Telegram API seems to limit the bot's responses per second.
Such an exception may look like this: telegram.error.RetryAfter: Flood control exceeded. Retry in X seconds where the X is a number of seconds obviously.
This is related to hopfenspace/MateBot#24 because it may be solved with a response queue for all bot replies. However, the two bugs use very different reply methods, so this may be hard to achieve.
An approach to fix this is capturing this exception and just waiting for the specified time without answering any further bot requests so that the limit is not exceeded. The downside of this is that a legitimate user doesn't get his reply, too.
Currently (29f6dc4), the inline reply via
update.callback_query.answercan't always be send. This happens on extreme spamming of inline keyboard buttons, e.g. when a user clicks on an inline button more than appr. ten times a second. AAfterReplyexception will be raised, because the bot always tries to reply. And the Telegram API seems to limit the bot's responses per second.Such an exception may look like this:
telegram.error.RetryAfter: Flood control exceeded. Retry in X secondswhere the X is a number of seconds obviously.This is related to hopfenspace/MateBot#24 because it may be solved with a response queue for all bot replies. However, the two bugs use very different reply methods, so this may be hard to achieve.
An approach to fix this is capturing this exception and just waiting for the specified time without answering any further bot requests so that the limit is not exceeded. The downside of this is that a legitimate user doesn't get his reply, too.