Answer the question
In order to leave comments, you need to log in
Telegram bot is it possible to insert the url taken from file_id into the thumb?
@dp.inline_handler()
async def inline(query: types.InlineQuery):
file = await bot.get_file("AAMCBAADGQEAAhIZYU2ZZjILG8Ra40Ibt3MKfY1sxaYAAtsAA2aa2yqd_AABhIsqdFgBAAdtAAMhBA")
link = f"https://api.telegram.org/file/bot{API_TOKEN}/{file.file_path}"
res = [types.InlineQueryResultArticle(id=0, title="test", thumb_url=link
, input_message_content=tt)]
await query.answer(results=res, cache_time=0, switch_pm_parameter="pp")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question