C
C
Cyril2020-05-10 19:45:40
Python
Cyril, 2020-05-10 19:45:40

How to bind a button to an image in python-telegram-bot?

There is a bot that accepts a picture with a description + an inline button is created, when clicked, a comment pops up (like a spoiler). After, everything is published to the group.
The question is how to implement the logic of binding a specific image to a button? and so that when adding a new picture, the comment under the old picture also works?
I work with the python-telegram-bot library. I added file_id, caption, and the comment itself to mongobd, but I don’t know how to get a specific comment by file_id from there.
Perhaps, in general, the logic is built incorrectly? Can anyone explain the implementation at least in general terms?
Or maybe someone is ready for a symbolic reward to tell in general terms in a personal conversation - write to the TG

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question