FormattedText#

class pyrogram.types.FormattedText[source]#

A text with some entities.

Parameters:
  • text (str) – The text.

  • parse_mode (ParseMode, optional) – Parse mode of the text. By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.

  • entities (List of MessageEntity, optional) – Entities contained in the text. Entities can be nested, but must not mutually intersect with each other. PRE, CODE and DATE_TIME entities can’t contain other entities. BLOCKQUOTE entities can’t contain other BLOCKQUOTE entities. BOLD, ITALIC, UNDERLINE, STRIKETHROUGH, and SPOILER entities can contain and can be part of any other entities. All other entities can’t contain each other.