Skip to main content

Module rich_message

Module rich_message 

Source
Expand description

Rich message types (Bot API 10.1).

Structs§

InputRichBlockAnchor
An anchor (<a name="…">).
InputRichBlockAnimation
An animation block (<video>). Caption on the inner media is ignored — use this block’s own caption instead.
InputRichBlockAudio
A music file block (<audio>). Caption on the inner media is ignored — use this block’s own caption instead.
InputRichBlockBlockQuotation
A block quotation (<blockquote>).
InputRichBlockCollage
A collage (<tg-collage>).
InputRichBlockDetails
An expandable details disclosure block (<details>).
InputRichBlockDivider
A divider (<hr/>).
InputRichBlockFooter
A footer (<footer>).
InputRichBlockList
A list of blocks (<ul> / <ol>).
InputRichBlockListItem
An item of a list to be sent, contained in an InputRichBlockList.
InputRichBlockMap
A map (<tg-map>).
InputRichBlockMathematicalExpression
A mathematical expression in LaTeX format (<tg-math-block>).
InputRichBlockParagraph
A text paragraph (<p>).
InputRichBlockPhoto
A photo block (<img>). Caption on the inner media is ignored — use this block’s own caption instead.
InputRichBlockPreformatted
A preformatted text block (<pre><code>).
InputRichBlockPullQuotation
A quotation with centered text (<aside>).
InputRichBlockSectionHeading
A section heading (<h1><h6>).
InputRichBlockSlideshow
A slideshow (<tg-slideshow>).
InputRichBlockTable
A table (<table>).
InputRichBlockThinking
A Thinking… placeholder for use while a bot streams an AI response.
InputRichBlockVideo
A video block (<video>). Caption on the inner media is ignored — use this block’s own caption instead.
InputRichBlockVoiceNote
A voice note block (<audio> in voice-note context). Caption on the inner media is ignored — use this block’s own caption instead.
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.
InputRichMessageMedia
Describes a media element embedded in an outgoing rich message.
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§

InputRichBlock
A block in a rich formatted message to be sent.
InputRichMessageMediaKind
The media to be sent, embedded in an outgoing rich message.
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.