Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

This is not a duplicated question. I want to use html codes in my telegram bot that is written by c#. I searched in SO but I did not find any answer. How to do that? I used TelegramBotSharp. Here is my code related to the part that I explained:

MessageTarget target = (MessageTarget)update.Chat ?? update.From;     
if(Text.StartsWith("Hello")) {
    bot.SendMessage(target, "Hello <a href='http://google.com'> dear</a>", true);
}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
286 views
Welcome To Ask or Share your Answers For Others

1 Answer

Use the following syntax in your message:

*bold text*

_italic text_

[inline URL](http://www.example.com/)

[inline mention of a user](tg://user?id=123456789)

pre-formatted fixed-width code block

Note: Only the tags mentioned above are currently supported.

Tags must not be nested.

All <, > and & symbols that are not a part of a tag or an HTML entity must be replaced with the corresponding HTML entities (< with &lt;, > with &gt; and & with &amp;).

All numerical HTML entities are supported.

The API currently supports only the following named HTML entities: &lt;, &gt;, &amp; and &quot;.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...