You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Telegram internally stores message formatting as plain text plus several entities that describe bold, underline, hyperlinks, etc., but the various Telegram APIs accept text in several forms.
Often times bugs occur when strings are not properly escaped and are parsed by Telegram as Markdown or HTML when they are in fact plan text; Telegram will refuse messages with invalid markup, such as an unescaped '<' or '&' character.
Because of this Telefrag offers a strongly-typed mechanism to address text. The following options can be used anyplace a method or property accepts the TelegramText type.
Parse Mode
Type
C# Usage
Plain text
System.String
"this text will be treated as plain and thus can safely contain unescaped <.< & other weirdness"
HTML
Telefrag.HTML
"This will be <b>bold</b> and <i>italic</i>" as HTML