td
td copied to clipboard
tag/mention a user
Not really an issue, just a question but I can't set a proper label.
I'm using python-telegram and with the following snippet I can reply to a message_id:
params = {
'chat_id': my_chat_id,
'reply_to': {
'@type': 'inputMessageReplyToMessage',
'message_id': my_message_id,
},
'input_message_content': {
'@type': 'inputMessageText',
'text': {
'@type': 'formattedText',
'text': my_message
},
},
}
result_send_message = tg.call_method('sendMessage', params)
Can you provide an example about how tag/mention a user that did not have a tg username? I know its user_id
Thanks
See https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1formatted_text.html and https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1text_entity_type_mention_name.html.