I
I
iliaaaaaaaaaaaaaa2021-06-17 18:31:43
Telegram
iliaaaaaaaaaaaaaa, 2021-06-17 18:31:43

How to respond to a user's message through the TG bot?

Let's say I have a couple of messages sent to me via a bot from different users. And I want to highlight one of them (with the help of reply in the telegram itself) and reply only to it. And my answer would be forwarded to the user who asked me this question.

But how to implement this task using python code?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stefan, 2021-06-19
@MEDIOFF

Write down the message_id and id of the users from which the message came in the database, put the handler on the messages in the bot, in the handler take the message_id from the reply message (or you can immediately take the user id, I don’t remember exactly), use it to pull out the user id and send him a message via bot.send_message()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question