Skip to main content

Module rich_message

Module rich_message 

Source
Expand description

Rich message types (Bot API 10.1).

Structs§

InputRichMessage
Describes a rich message to be sent.
InputRichMessageContent
Rich message content to be sent as the result of an inline / guest / Web App query.
RichBlockAnchor
An in-document anchor (<a name="…"></a>).
RichBlockAnimation
A looping animation / GIF block (<video loop>).
RichBlockAudio
An audio file block (<audio>).
RichBlockBlockQuotation
A block quotation (<blockquote>).
RichBlockCaption
Caption (and optional credit) for a media block.
RichBlockCollage
A multi-media collage (<tg-collage>).
RichBlockDetails
A collapsible details / disclosure block (<details>).
RichBlockDivider
A horizontal rule / divider (<hr/>).
RichBlockFooter
A footer block (<footer>).
RichBlockList
An ordered or unordered list (<ul> / <ol>).
RichBlockListItem
A single item inside a RichBlockList.
RichBlockMap
An embedded map (<tg-map>).
RichBlockMathematicalExpression
A block-level mathematical expression in LaTeX format (<tg-math-block>).
RichBlockParagraph
A text paragraph (<p>).
RichBlockPhoto
A photo block (<photo>).
RichBlockPreformatted
A preformatted text block (<pre><code>).
RichBlockPullQuotation
A pull quotation with centred text (<aside>).
RichBlockSectionHeading
A section heading, corresponding to <h1><h6>.
RichBlockSlideshow
A media slideshow (<tg-slideshow>).
RichBlockTable
A table (<table>).
RichBlockTableCell
A single cell inside a RichBlockTable.
RichBlockThinking
A Thinking… placeholder for use while a bot streams an AI response.
RichBlockVideo
A video block (<video>).
RichBlockVoiceNote
A voice note block (<audio> in voice-note context).
RichMessage
A complete rich formatted message as received from the Bot API.
RichTextAnchor
An in-document anchor definition (<a name="id"></a>).
RichTextAnchorLink
A link to an in-document anchor (<a href="#id">text</a>).
RichTextBankCardNumber
A bank card number.
RichTextBold
Bold text (**text** / <b>text</b>).
RichTextBotCommand
A bot command (e.g. /start).
RichTextCashtag
A $cashtag.
RichTextCode
Inline monospace/code text (`text` / <code>text</code>).
RichTextCustomEmoji
A custom emoji (![alt](tg://emoji?id=...)).
RichTextDateTime
A date/time entity rendered according to the client’s locale.
RichTextEmailAddress
An e-mail address link ([text](mailto:addr) / <a href="mailto:addr">text</a>).
RichTextFootnote
The body of a footnote.
RichTextHashtag
A #hashtag.
RichTextItalic
Italic text (*text* / <i>text</i>).
RichTextMarked
Highlighted/marked text (==text== / <mark>text</mark>).
RichTextMathematicalExpression
An inline LaTeX mathematical expression ($expr$ / <tg-math>expr</tg-math>).
RichTextMention
A @username mention.
RichTextPhoneNumber
A telephone number link ([text](tel:+nnn) / <a href="tel:+nnn">text</a>).
RichTextReference
A reference to a previously defined footnote.
RichTextSpoiler
Spoiler text (||text|| / <tg-spoiler>text</tg-spoiler>).
RichTextStrikethrough
Strikethrough text (~~text~~ / <s>text</s>).
RichTextSubscript
Subscript text (<sub>text</sub>).
RichTextSuperscript
Superscript text (<sup>text</sup>).
RichTextTextMention
A mention of a Telegram user by their User object.
RichTextUnderline
Underlined text (<u>text</u>).
RichTextUrl
A hyperlink ([text](url) / <a href="url">text</a>).

Enums§

RichBlock
A block-level element in a rich message.
RichText
Rich formatted text — a recursive sum type that mirrors the Telegram RichText union from Bot API 10.1.