I want to reduce the number of requests from Telegram to my server and make the bot receive only messages with images, URLs or documents. I use webhook.
If this is achievable, then how?
I want to reduce the number of requests from Telegram to my server and make the bot receive only messages with images, URLs or documents. I use webhook.
If this is achievable, then how?
It is possible to some extend through the allowed_updates
parameter of the https://core.telegram.org/bots/api#setwebhook method:
List the types of updates you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used.
Very sadly though it is not possible to receive only updates with urls, since this is text.
If you want to reduce the amount of requests made, than you could attempt to use the getUpdates
method. Sorry :/