pub enum InputRichBlock {
Show 24 variants
Paragraph {
text: RichText,
},
Heading {
text: RichText,
size: u8,
},
Pre {
text: RichText,
language: Option<String>,
},
Footer {
text: RichText,
},
Divider,
MathematicalExpression {
expression: String,
},
Anchor {
name: String,
},
List {
items: Vec<InputRichBlockListItem>,
},
BlockQuotation {
blocks: Vec<InputRichBlock>,
credit: Option<RichText>,
},
ExpandableBlockQuotation {
text: RichText,
credit: Option<RichText>,
},
PullQuotation {
text: RichText,
credit: Option<RichText>,
},
Collage {
blocks: Vec<InputRichBlock>,
caption: Option<RichBlockCaption>,
},
Slideshow {
blocks: Vec<InputRichBlock>,
caption: Option<RichBlockCaption>,
},
Table {
cells: Vec<Vec<RichBlockTableCell>>,
is_bordered: Option<bool>,
is_striped: Option<bool>,
is_compact: Option<bool>,
caption: Option<RichText>,
},
Details {
summary: RichText,
blocks: Vec<InputRichBlock>,
is_open: Option<bool>,
},
Map {
location: Location,
zoom: Option<u8>,
width: Option<u32>,
height: Option<u32>,
caption: Option<RichBlockCaption>,
},
Buttons {
buttons: Vec<RichMessageButton>,
align: Option<HorizontalAlign>,
},
Animation {
animation: InputMediaAnimation,
caption: Option<RichBlockCaption>,
},
Audio {
audio: InputMediaAudio,
caption: Option<RichBlockCaption>,
},
Document {
document: InputMediaDocument,
caption: Option<RichBlockCaption>,
},
Photo {
photo: InputMediaPhoto,
caption: Option<RichBlockCaption>,
},
Video {
video: InputMediaVideo,
caption: Option<RichBlockCaption>,
},
VoiceNote {
voice_note: InputMediaVoiceNote,
caption: Option<RichBlockCaption>,
},
Thinking {
text: RichText,
},
}Expand description
A block in a rich formatted message to be sent, tagged by the type field.
Variants§
Paragraph
A text paragraph (<p>).
Heading
A section heading (<h1>–<h6>).
Pre
A preformatted text block (<pre><code>).
Fields
A footer (<footer>).
Divider
A divider (<hr/>).
MathematicalExpression
A block formula (<tg-math-block>).
Anchor
An anchor (<a name="…">).
List
A list (<ul> / <ol>).
Fields
items: Vec<InputRichBlockListItem>Items of the list.
BlockQuotation
A block quotation (<blockquote>).
Fields
blocks: Vec<InputRichBlock>Content of the block.
ExpandableBlockQuotation
An expandable block quotation (<blockquote expandable>, Bot API 10.3).
PullQuotation
A quotation with centered text (<aside>).
Collage
A collage (<tg-collage>).
Fields
blocks: Vec<InputRichBlock>Elements of the collage.
caption: Option<RichBlockCaption>Optional. Caption of the block.
Slideshow
A slideshow (<tg-slideshow>).
Fields
blocks: Vec<InputRichBlock>Elements of the slideshow.
caption: Option<RichBlockCaption>Optional. Caption of the block.
Table
A table (<table>).
Fields
cells: Vec<Vec<RichBlockTableCell>>Cells of the table.
Details
An expandable details block (<details>).
Fields
blocks: Vec<InputRichBlock>Content of the block.
Map
A map (<tg-map>).
Fields
caption: Option<RichBlockCaption>Optional. Caption of the block.
Buttons
A row of 1-8 buttons (<tg-button-row>, Bot API 10.3).
Animation
An animation (<video>).
Fields
animation: InputMediaAnimationThe animation; caption is ignored.
caption: Option<RichBlockCaption>Optional. Caption of the block.
Audio
A music file (<audio>).
Fields
audio: InputMediaAudioThe audio; caption is ignored.
caption: Option<RichBlockCaption>Optional. Caption of the block.
Document
A general file (<tg-document>, Bot API 10.3).
Fields
document: InputMediaDocumentThe document; caption is ignored.
caption: Option<RichBlockCaption>Optional. Caption of the block.
Photo
A photo (<img>).
Fields
photo: InputMediaPhotoThe photo; caption is ignored.
caption: Option<RichBlockCaption>Optional. Caption of the block.
Video
A video (<video>).
Fields
video: InputMediaVideoThe video; caption is ignored.
caption: Option<RichBlockCaption>Optional. Caption of the block.
VoiceNote
A voice note (<audio>).
Fields
voice_note: InputMediaVoiceNoteThe voice note; caption is ignored.
caption: Option<RichBlockCaption>Optional. Caption of the block.
Thinking
A “Thinking…” placeholder; only valid in sendRichMessageDraft.