feat(telegram): add sendRichMessage support via telegram_rich.py#230
Merged
Conversation
When users don't have a username, we can now mention them using tg://user?id=USER_ID links in Markdown format. Changes: - Add --source-user-id and --source-display-name args to telegram_send.py - Mention format: [Display Name](tg://user?id=USER_ID) - Falls back to @username if --source-username is provided - Falls back to @username if neither user ID nor username is provided - Update SKILL.md with documentation and examples This enables precise user mentions even for users without Telegram usernames.
Add telegram_rich.py wrapping the Bot API 10.1 (June 2026) sendRichMessage endpoint, supporting both rich-html-style and rich-markdown-style payloads. Use --html-file / --markdown-file to pass large payloads from disk to avoid shell-escaping pitfalls, plus --edit MESSAGE_ID for in-place edits. Update SKILL.md to mark rich messages as the preferred path for anything beyond a single short paragraph, document the new script, and call out the tag set supported by rich-html-style.
bb7c7eb to
c6b6f2e
Compare
Required by end-of-file-fixer prek hook.
frostming
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for Bot API 10.1 (June 2026) Rich Messages to the Telegram skill.
What
scripts/telegram_rich.pywrappingsendRichMessage(andeditMessageTextvia--edit), supporting both rich-html-style and rich-markdown-style payloads.--html-file/--markdown-fileto stream large payloads from disk (avoids shell-escaping pitfalls for heredoc).Why
sendRichMessagewith structured formatting — headings, lists, tables, blockquotes, collapsible<details>, math, captioned media, code blocks with language hints — that plain MarkdownV2 cannot express. The skill should default to the structured path so Bub can take advantage of it without re-deriving the schema each time.Tested live
Sent a full demo payload (table + blockquote +
<details>+ math +<a href>) to-1003880657674via the new script. The API returnedok=trueand the message rendered with all structures intact.