eternnoir / pyTelegramBotAPI

Python Telegram bot api.
GNU General Public License v2.0
8.11k stars 2.03k forks source link

`Inline Mode URL` #1367

Closed tech-savvy-guy closed 2 years ago

tech-savvy-guy commented 2 years ago

Can we use the get_file_url() method to set the url for a media in the Inline Mode?

image

Something like this? ☝🏻

Badiboy commented 2 years ago

get_file_url is not a function for internet crawling. It's a special function to retrive the downloadable url for telegram file.

tech-savvy-guy commented 2 years ago

@Badiboy How can I use Inline Mode with file_ids of media already stored on the Telegram servers?

coder2020official commented 2 years ago

https://core.telegram.org/bots/api#inlinequeryresultcachedphoto Use cached classes

tech-savvy-guy commented 2 years ago

@coder2020official Thanks for the reply!

I used this method, however only the first option is being displayed by the bot.

image

tech-savvy-guy commented 2 years ago

@coder2020official Thanks for the reply!

I used this method, however only the first option is being displayed by the bot.

image

Well, on further investigation ,it seems like there is a delay in updating the information to the bot. Like I was running the script several times but it displayed all the 4 images after several re-runs. Again I deleted, one of the query from the queries list and it still shows me all 4 images instead of 3.