-
Notifications
You must be signed in to change notification settings - Fork 605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide 429 exception for webhook updates on inline query #648
Comments
You can call |
@levlam I have rewritten the bot to edit the message in the http response, but when mutliple users are simultaneously using the bot, I still sometimes get drops, only now there is no error to inspect. What are the "per chat limits"? |
Per chat limits are documented at https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this:
|
@levlam does this include editing messages? I saw this FAQ but it does not mention that, and I'm still surprised to be running into limits like this. |
Yes, it includes message editing. |
@levlam in that case, my thought is this: If I receive an inline query, and send back an edit for that same message, there is no way to abuse the system with those kind of updates, especially with it being 1:1 with user interaction. Couple that with cutting down traffic by giving a webhook response rather than a separate request, and it seems reasonable that these not be rated. Is there some other consideration I am missing? |
This is possible, but it would require harder limits for callback query sending by users. |
@levlam that is my suggestion then, especially because responding to a webhook query yields no way to know if the action was successful. I cannot picture a use case where a bot would require more than, say, 1 interaction per second per message with callback queries, and the bot I am asking about is a game- which would be more interaction than most bots. |
When several users are active on my bot at one time, mostly interacting with callback queries, I am getting a 429 error sending the update back.
I believe if my bot is receiving one callback query, a 1:1 ratio of requests in to requests out should not trigger the 429 rate limiter, especially in reference to the same inline message id, as this cannot be used to spam.
The text was updated successfully, but these errors were encountered: