I´m developing a telegram bot in c#.
Using the class TelegramBotClient
in Telegram.Bot
library.
I want to send a message with SendTextMessageAsync
using HTML option.
In the official documentation (https://core.telegram.org/bots/api#markdown-style) I can see this:
string texto = @"<b>bold</b>, <strong> bold </strong>" +
@"<i> italic </i>, <em> italic </em>" +
@"<a href = 'http://www.example.com/'> inline URL </a>" +
@"<a href = 'tg://user?id=123456789'> inline mention of a user</a>" +
@"<code> inline fixed-width code </code>" +
@"<pre> pre - formatted fixed-width code block</pre>";
Bot.SendTextMessageAsync(chatId: id_chat,
text: texto,
parseMode: ParseMode.HTML);
It works corretly but I want to use "New Lines" and "List". I have seen them on telegram official notificacion like in this photo:
I have tried <br>, </br>, <br/>
... etc.
But I have get the
Telegram.Bot.Exceptions.ApiRequestException: 'Bad Request: can't parse entities: Unexpected end tag at byte offset 36
Does anyone know if it´s possible to do it?
Also if possible to link a telephone number?
str_replace('<br>', chr(10), $msg)
– Vigen