A
A
Andriilie2022-01-03 21:17:58
Python
Andriilie, 2022-01-03 21:17:58

How to realize that when you press the keyboard button in the telegram bot, you open a chat with a person?

In Telegram, the bot, when clicking on the 'order' button, should transfer the user to a chat with a specific person. There is no dialogue with him yet. His Id is

bot.send_message () - I tried this function and it turns out that the bot itself sends a message to this person. And it should be so that it would just open a chat with the user.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
InternetMaster, 2022-01-04
@Andriilie

You can use the Inline button as a url to pass the username of the user with whom you want to open a chat. Link in the format t.me/username.

R
rPman, 2022-01-03
@rPman

telegram clients do not have such functionality, the
only way to open a chat is to write a message

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question