Package-level declarations
Types
Describes a rich message to be sent. Exactly one of the fields html or markdown must be used. Use the InputRichMessageHTML and InputRichMessageMarkdown factories to build an instance.
Represents a block in a rich formatted message.
A block with an anchor.
A block with an animation.
A block with a music file.
A block quotation.
Caption of a rich formatted block.
A collage.
A divider.
A footer.
A list of blocks.
Builder of RichBlockListItems used inside RichBlocksBuilder.list.
An item of a RichBlockList.
A block with a map.
A block with a mathematical expression in LaTeX format.
A text paragraph.
A block with a photo.
A preformatted text block.
A quotation with centered text.
A section heading.
A slideshow.
A table.
A cell in a RichBlockTable.
A block with a "Thinking…" placeholder. May be used only in sendRichMessageDraft.
A block with a video.
A block with a voice note.
Represents a rich formatted text. It can be either a plain text (RichTextPlain), a group of rich texts (RichTextGroup) or any of RichTextEntity subtypes.
An anchor.
A link to an anchor.
A RichTextEntity with a bank card number.
A bold RichTextEntity.
A bot command.
Builder of a single RichText. Each call appends a part; build returns a RichTextPlain/RichTextEntity when there is exactly one part, a RichTextGroup otherwise.
A cashtag.
A monowidth RichTextEntity.
A custom emoji RichTextEntity.
A formatted date and time RichTextEntity.
DslMarker for the rich message builders, so the inner RichTextBuilder, RichBlocksBuilder and RichBlockListBuilder scopes do not leak their receivers into each other.
A RichTextEntity with an email address.
A group of RichTexts. Serialized as a JSON array.
A hashtag.
Rich formatted message.
An italicized RichTextEntity.
A marked RichTextEntity.
A mathematical expression in LaTeX format.
A mention by a username.
A RichTextEntity with a phone number.
A plain (non-formatted) part of a RichText. Serialized as a bare JSON string.
A reference.
A link to a reference.
A RichTextEntity covered by a spoiler.
A strikethrough RichTextEntity.
A subscript RichTextEntity.
A superscript RichTextEntity.
A mention of a Telegram user by their identifier.
An underlined RichTextEntity.
A RichTextEntity with a link.
Properties
Rich HTML style source of all the RichTextInfo.blocks.
Rich Markdown style source of all the RichTextInfo.blocks.
The nested RichBlocks directly contained by this block, or an empty list for leaf blocks. Container blocks (RichBlockList via its RichBlockListItem.blocks, RichBlockBlockQuotation, RichBlockCollage, RichBlockSlideshow and RichBlockDetails) expose their children here.
Functions
Builds a List of RichBlocks using the RichBlocksBuilder DSL.
Builds a RichText using the RichTextBuilder DSL.
Builds a RichTextInfo using the RichBlocksBuilder DSL.
Escapes all the richMarkdownSpecialCharacters of the receiver with a backslash so that the resulting string is represented literally in the Rich Markdown style.
Creates an InputRichMessage with the content described using HTML formatting.
Creates an InputRichMessage with the content described using Markdown formatting.
Builds the Rich HTML style source string for this list of RichBlocks. The resulting string may be passed to InputRichMessageHTML. See toRichMarkdown for the media note.
Builds the Rich Markdown style source string for this list of RichBlocks. The resulting string may be passed to InputRichMessageMarkdown.