K
K
Konst20222022-02-23 12:03:13
go
Konst2022, 2022-02-23 12:03:13

How to mention telegram user by id?

Tell me how to embed a link like tg://user?id=var_ID, where var_ID is a variable with a user id in a message by type

msg.Text=(update.Message.From.FirstName+", "+player_info.text_predict)
c.Bot.Send(msg)

where, instead of just a username, there will be a link with his name, when clicked, it will open his profile?
I have already read similar solutions, and I roughly understand that I need to use Message.entities, but I can’t figure out how to write it correctly

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nozzy, 2022-02-23
@nozzy

Using such a link, you can go to the user only if you were in correspondence with him or you have common groups with him. You can go to an unfamiliar user by username, but not everyone has it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question