C
C
Cyril2020-04-29 02:19:10
Python
Cyril, 2020-04-29 02:19:10

How to save a message under a post in a Telegram bot?

The essence of the bot is simple - a picture, and under it an inline button, when clicked, a message pops up.
The dilemma is that when loading the next picture and adding a button with a message under it, the message under the button is also updated for the previous picture.
As I understand it, you need to store each message for each specific picture. What if there are 1000 of them? Is everything stored in a database?
Please give me an idea of ​​how to organize all this, in general terms.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Lee, 2020-04-29
@Pus1st

Please explain more simply.
Given: There is a picture, below it is a button with a certain id and text.
Problem: When uploading another image, you add the same button with the same id but different text. The text changes on all buttons, but should only on the new one.
Did I understand correctly?
You need to create a new button with a different id for each image. To store such information, it is most convenient to use a database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question