Answer the question
In order to leave comments, you need to log in
How to send a message to a user inside a chat?
How to send a message to a user inside the chat if the user does not have a login (username), i.e. @vasya
cannot be contacted, he has only a First and Last Name.
It is necessary that this message work as a message addressed only to him, i. @vasya привет
Please tell me
https://github.com/yagop/node-telegram-bot-api
Answer the question
In order to leave comments, you need to log in
This is done using the caption_entities field of the Message object .
caption_entitites is an optional field, an array of objects of the MessageEntity type, in which you can specify various additional information, including text_mention - just for cases when the user does not have @username . Instead, first_name and last_name are used (the second is optional).
Links to official documentation: MessageEntity , User
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question