Free Telegram bot that turns Markdown (or a .md file) into Telegram Rich Markdown posts — no subscriptions, no ads, private chats only.
Bot: @amthpostbot · Features · Quick Start · Post Format
Important
Non-commercial project under CC BY-NC-SA 4.0. Free to use for personal / non-commercial purposes — see LICENSE.
Tip
Open @amthpostbot, send /start, then try /example or the Show example button to see a finished rich post.
- Free to use — no subscriptions, payments, accounts, or promo steps
- Accepts Markdown as a Telegram message or a UTF-8
.mdfile - Converts
details,collage, andslideshowinto Telegram Rich Markdown blocks - Validates Markdown and HTML media URLs before sending
- Optional SOCKS5 / SOCKS5H proxy
- Built-in example via
/exampleand the Show example button
- Python 3.10 or newer
- A Telegram bot token from @BotFather
- A Bot API endpoint that supports
sendRichMessage
Note
The bot does not need to be an administrator or member of any channel or group. It works in private chats only.
If the project was useful, consider starring the repository. It helps other developers discover it and makes the project easier to find again later.
-
Install dependencies:
pip install -r requirements.txt
-
Copy the environment template:
cp .env.example .env
-
Set your bot token in
.env:TELEGRAM_BOT_TOKEN=123456789:your_real_bot_token TELEGRAM_PROXY_URL=
-
Start the bot:
python main.py
-
Open the bot in Telegram and send
/start.
Warning
Never commit a real bot token. Keep secrets in .env (Git-ignored). If a token was ever leaked — revoke it in BotFather and create a new one.
The bot reads .env from the project directory by default. Environment variables override values from the file.
| Variable | Required | Description |
|---|---|---|
TELEGRAM_BOT_TOKEN |
Yes | Bot token from BotFather |
BOT_API_BASE |
No | Bot API base URL (default https://api.telegram.org) |
TELEGRAM_PROXY_URL |
No | Optional SOCKS5 / SOCKS5H proxy URL |
BOT_ENV_FILE |
No | Optional path to another env file |
| Command | Description |
|---|---|
/start |
Format guide + example button |
/help |
Same as /start |
/example |
Sends sample_post.md source, then the formatted rich post |
Note
Messages from groups, channels, and other non-private chats are ignored, so nothing is posted outside your private conversation by accident.
Send standard Markdown as text, or upload a UTF-8 .md file. Invalid content gets line-based validation errors.
:::details FAQ
Hidden content goes here.
::::::details open FAQ
This content starts open.
::::::collage


::::::slideshow


:::Caution
Media URLs in Markdown images and HTML src must start with http:// or https://. Telegram cannot fetch local file paths.
Full sample: sample_post.md.
Non-commercial use under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International. See LICENSE.
- Keep
.envout of Git; use.env.examplefor public examples - Rotate any bot token that was committed or shared
-
python -m py_compile main.py - Smoke-test
/start,/help,/example, a text post, a.mdupload, and an invalid media URL



