cxumol / tg2md-bot

Telegram bot converting Telegram's rich text to Markdown

Home Page:https://t.me/tg2mdBot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tg2md-bot

Telegram bot converting Telegram's rich text to Markdown.

Relevant technical details can be found on the blog post Rich-Text in Telegram: A Guide to Converting to Markdown and Understanding the Logic Behind Markup Languages.

Preview

image

Environment

The code is intended to run on Deno Deploy

Use

https://t.me/tg2mdBot

Send formatted meassage to the Telegram bot and the bot will send the message back in Markdown.

By default, "spoiler" and "underline" are ignored, because these styles are generally not available in Markdown (dialects).

To force convert "spoiler" and "underline" entities, add !unstable at the beginning of your rich text, and the bot will use HTML tags for convertion. But this feature can bring compatibility issues in edge cases.

Contribution

Find bugs in edge cases? No problem. Pull requests are welcomed!

Acknowledgement

About

Telegram bot converting Telegram's rich text to Markdown

https://t.me/tg2mdBot

License:MIT License


Languages

Language:JavaScript 100.0%