V
V
Valery2021-06-06 13:42:17
Python
Valery, 2021-06-06 13:42:17

Creating a Telegram Bot Carousel?

You need to create a product carousel in the telegram bot.
At the moment there is a bot that displays the items in the cart from the database. I would like the bot to send one message, and already through the buttons, the content of these messages changed.
Example:
image.png
image.png
Do the same.

The list of goods that the bot receives, for displaying goods:
[('Deadly Paralysis Poison', 'Description: Deadly Paralysis Poison', 'url_img'), ('Deadly Anti-Magic Poison', 'Description: Deadly Anti-Magic Poison', 'url_img') , ('Deadly Poison', 'Description: Deadly Poison', 'url_img'), ('Volendrang', 'Description: Volendrang', 'url_img')]
I would like to hear the algorithm for implementing such a feature.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Krostelev, 2021-06-07
@ApXNTekToP

Depending on which library you are using.
You essentially need to use the methods
bot,edit_message_media() - for editing images
bot.edit_message_reply_markup() - for editing buttons
, the parameters for these functions can be found in the library itself .
UPD A
similar question has already been discussed
How to replace a photo of a bot in telegrams?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question