C
C
Cyril2020-05-03 18:18:49
Python
Cyril, 2020-05-03 18:18:49

How to make a publication in a group through a bot containing an image and an inline button using the python-telegram-bot library?

The essence of the bot: picture + description, below them - an inline button with a pop-up comment.
using chat_data[query.message.id] = comment we managed to attach a comment to a specific message with a picture. When adding new pictures and buttons, everything works as it should within the bot.
When publishing this post in a group, the button apparently becomes unresponsive. Most likely, because the popup comment is tied to a specific chat_id and mes_id, which change after publication.
There is a chat_id migration function, but I did not quite understand how to use it.
Tell me, can there be an easier way to transfer pictures and buttons to a group? Maybe the logic is wrong in the first place?

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