Telegram Bot API 10.1 RichMessage support in TelePi


ai pi coding agent telegram

As I’ve mentioned before, I currently prefer the Pi coding agent which I often use via the TelePi Telegram bridge.

I prefer TelePi over many of the other telegram bridges because it’s a straight-forward setup that operates on the Pi session store via the official API, it does not try to maintain long running Pi subprocesses and it enables me to manipulate and run parallel sessions as much as I want to.

Telegram upgrades their markdown support

In their recent June 11 Bot API 10.1 update, Telegram shipped support for Rich Messages.

Where previously one’s bot (or Pi coding agent) could only send super simple markdown, with the new API they can send far more rich markdown, including headings, tables and more.

I upgrade TelePi’s support

Because I often need my Pi agent to send me structured summaries of things, I was missing this advanced markdown support in TelePi, and so yesterday (Saturday!) I set out to add it.

I’m happy to report that after some code spelunking (one of my most favourite hobbies!) I understood the logic flow and could make the necessary updates.

This is what a simple markdown message looked like previously:

Screenshot of Telegram markdown rendering before

Screenshot of Telegram markdown rendering before

This is what it looks like with my new Rich Message support:

Screenshot of Telegram markdown rendering with rich message support

Screenshot of Telegram markdown rendering with rich message support

I have offered my work to the author as a github pull request (PR) which they might or might not accept.

In the meantime, if you need this, you can clone my TelePi send-rich-message fork and then follow the instructions under Development from Source.

Ironically, I coded most of these changes without AI-assistance.

As always, this post is also…

100% human-written

Comments via 🦋