mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-07-02 16:15:24 +00:00
Add a type-safe Kotlin DSL for building rich messages:
* buildRichText { } - RichTextBuilder with plain() plus a function for every
RichTextEntity (String and nested RichTextBuilder overloads where text-bearing);
* buildRichBlocks { } / buildRichTextInfo { } - RichBlocksBuilder with the
text-bearing and container blocks (paragraph, heading, list, blockQuotation,
details, ...), nesting RichText or further blocks per block kind;
* RichBlockListBuilder for list items.
Container blocks expose nested block/text builders; file/cell-heavy blocks (media,
table, collage, slideshow, map) are appended via add() / unary plus. A
@DslMarker (RichTextDsl) keeps the nested scopes from leaking receivers.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>