Class FormattedTextExtraction
Custom extension class, implements methods to extract HTML- or Markdown-formatted text from messages, using their message entities
Inheritance
Inherited Members
Namespace: TelegramBotApi.Extensions.FormattedTextExtraction
Assembly: TelegramBotApi.dll
Syntax
public static class FormattedTextExtraction
Methods
| Improve this Doc View SourceExtractHTML(String, MessageEntity[])
Extracts the HTML-formatted text from a message text, using the message's entities. Calling this method will not result in an API call.
Declaration
public static string ExtractHTML(this string messageText, MessageEntity[] messageEntities)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageText | The message text to be HTML-formatted |
MessageEntity[] | messageEntities | The entities of the message, with which the |
Returns
Type | Description |
---|---|
System.String | The |
ExtractHTML(Message)
Extracts the HTML-formatted text from a message, using its message entities. Calling this method will not result in an API call.
Declaration
public static string ExtractHTML(this Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message to extract the HTML-formatted text |
Returns
Type | Description |
---|---|
System.String | HTML-formatted text of the given |
ExtractMarkdown(String, MessageEntity[])
Extracts the Markdown-formatted text from a message text, using the message's entities. Calling this method will not result in an API call.
Declaration
public static string ExtractMarkdown(this string messageText, MessageEntity[] messageEntities)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageText | The message text to be Markdown-formatted |
MessageEntity[] | messageEntities | The entities of the message, with which the |
Returns
Type | Description |
---|---|
System.String | The |
ExtractMarkdown(Message)
Extracts the Markdown-formatted text from a message, using its message entities. Calling this method will not result in an API call.
Declaration
public static string ExtractMarkdown(this Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message to extract the Markdown-formatted text |
Returns
Type | Description |
---|---|
System.String | Markdown-formatted text of the given |