Telethon
Telethon copied to clipboard
Support InlineQueryResultCached* results for inline bots
Please add support for all the InlineQueryResultCached* results for media objects stored on telegram servers.
A possible use case could look like this:
async def inline_query_event_handler(self, event: InlineQuery) -> None:
await event.answer([
event.builder.cached_photo(
Path('testpicture_pixeled.jpg'),
....
)
])
https://core.telegram.org/bots/api#inlinequeryresult
InlineQueryResultCachedAudio
InlineQueryResultCachedDocument
InlineQueryResultCachedGif
InlineQueryResultCachedMpeg4Gif
InlineQueryResultCachedPhoto
InlineQueryResultCachedSticker
InlineQueryResultCachedVideo
InlineQueryResultCachedVoice
Can I know, why there is a path in use case?
InlineQueryResultCached* of Bot api takes file id.
And you can use Photo and Document (media types) (or from message.media) in event.builder.document for media objects already on telegram servers.
This is unlikely to happen in the near future so I will be closing the issue. We can reopen it if there's still interest once the time is right.