FormattedText#
- class pyrogram.types.FormattedText[source]#
A text with some entities.
- Parameters:
text (
str) – The text. If the message contains entities (bold, italic, …) you can access text.markdown or text.html to get the marked up message text. In case there are no entities, the fields will contain the same text as 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,CODEandDATE_TIMEentities can’t contain other entities.BLOCKQUOTEentities can’t contain otherBLOCKQUOTEentities.BOLD,ITALIC,UNDERLINE,STRIKETHROUGH, andSPOILERentities can contain and can be part of any other entities. All other entities can’t contain each other.