Y
Y
yasegor2021-09-13 03:07:27
Python
yasegor, 2021-09-13 03:07:27

How to add text and image in inline mode (aiogram)?

Tell me how to make exactly the same selection menu?
In coding a kettle, I'm making a bot for the first time.
Here is the existing code:

inline_btn_6 = InlineKeyboardButton('Elf Bar | 800 ✅', switch_inline_query_current_chat='800 ✅')
inline_btn_7 = InlineKeyboardButton('Elf Bar | 1500 ✅', switch_inline_query_current_chat='')
inline_btn_8 = InlineKeyboardButton('Elf Bar Lux | 1500 ✅', switch_inline_query_current_chat='')
inline_btn_9 = InlineKeyboardButton('Назад ↩️',callback_data='Back')
inline_kb_full3 = InlineKeyboardMarkup(row_width=1).add(inline_btn_6,inline_btn_7,inline_btn_8,inline_btn_9)


613e95e9982f3856583744.jpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman, 2021-09-13
@yasegor

If you do not have access to the site using the link entered in the message, then nothing.
613eabf391246464896824.png
This information is not added to the display by the bot, this is done by the telegram client itself, taking information directly from the site via the link. This information is indicated on the site page using meta tags in the header.

<head>
    ...
    <meta property="og:type" content="website" />
    <meta property="og:url" content="https://www.detmir.ru" />
    <meta property="og:title"
        content="Интернет магазин детских товаров и игрушек в Москве, игрушки и товары для детей в интернет магазине Детский Мир" />
    <meta property="og:description"
        content="Интернет-магазин «Детский Мир» предлагает купить товары и игрушки для детей по выгодной цене. В нашем каталоге Вы можете выбрать и заказать детские товары и игрушки с доставкой по Москве, Санкт-Петербургу, Новосибирску и другим городам России." />
    <meta property="og:image" content="https://go.detmir.st/img/96f25dcdeb082e67509489b08990ae0a.png" />
    <meta name="google-site-verification" content="H12mlaR4ux4mUKnx_ECZzODISfpLd6wlgAZVM5XZSYU" />
    <link rel="image_src" href="https://go.detmir.st/img/96f25dcdeb082e67509489b08990ae0a.png" />
...
</head>

S
Stefan, 2021-09-13
@MEDIOFF

In coding a kettle, I'm making a bot for the first time.

Don’t make a bot then, go freelancing , they’ll do it for you for a pack of crackers, and if you want to learn how to program, then start with the basics, syntax, designs, algorithms, a lot of material, then learn how to base, and such questions will disappear

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question