GitHub - rassvetteam/Amethyst-Post-Bot: A small Telegram bot that allows you to publish posts in a new format thanks to a slightly modified .md file! · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading. Please reload this page.
rassvetteam
Amethyst-Post-Bot
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>5 Commits<br>5 Commits
.env.example
.env.example
.gitignore
.gitignore
LICENSE
LICENSE
README.md
README.md
main.py
main.py
requirements.txt
requirements.txt
sample_post.md
sample_post.md
View all files
Repository files navigation
Amethyst Post Bot
A free, non-commercial Telegram bot that converts plain Markdown or uploaded .md files into Telegram Rich Markdown posts. It has no channel or chat subscription requirement and does not advertise or sell anything.
The bot works in private chats. It validates media links, converts several convenient custom blocks, and returns the formatted result through sendRichMessage.
Telegram bot: @amthpostbot
Features
Free to use without subscriptions, payments, accounts, or promotional steps.
Accepts Markdown as a Telegram message or a UTF-8 .md file.
Converts details, collage, and slideshow directives into Telegram Rich Markdown blocks.
Validates Markdown and HTML media URLs before sending.
Supports an optional SOCKS5/SOCKS5H proxy.
Provides an example through /example and the Show example button.
Requirements
Python 3.10 or newer.
A Telegram bot token from BotFather.
A Bot API endpoint that supports sendRichMessage.
The bot does not need to be an administrator or member of any channel or group.
Quick Start
Install the 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<br>TELEGRAM_PROXY_URL=
Start the bot:
python main.py
Open the bot in Telegram and send /start.
Configuration
The bot reads .env from the project directory by default. Real secrets must stay in .env; Git ignores this file.
Variable<br>Required<br>Description
TELEGRAM_BOT_TOKEN<br>Yes<br>Bot token from BotFather.
BOT_API_BASE<br>No<br>Bot API base URL. Defaults to https://api.telegram.org.
TELEGRAM_PROXY_URL<br>No<br>Optional SOCKS5/SOCKS5H proxy URL.
BOT_ENV_FILE<br>No<br>Optional path to a different environment file.
Environment variables take priority over values from .env.
Commands
/start — displays the format guide and example button.
/help — displays the format guide and example button.
/example — sends the source of sample_post.md followed by the formatted rich post.
Messages from groups, channels, and other non-private chats are ignored to prevent accidental output outside the user's private conversation.
Post Format
Send standard Markdown directly or upload a UTF-8 .md file. The bot replies with line-based validation errors when the content is invalid.
Details block:
:::details FAQ<br>Hidden content goes here.<br>:::
Expanded by default:
:::details open FAQ<br>This content starts open.<br>:::
Collage:
:::collage<br><br><br>:::
Slideshow:
:::slideshow<br><br><br>:::
Media links in Markdown images and HTML src attributes must start with http:// or https://. Telegram cannot fetch local file paths.
See sample_post.md for a complete example.
License
This project is provided for non-commercial use under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license. See LICENSE.
Release Checklist
Keep .env out of Git and use .env.example for public configuration examples.
Rotate any bot token that was ever committed or shared publicly.
Check syntax with python -m py_compile main.py.
Test /start, /help, /example, a text post, a .md upload, and an invalid media URL.
About
A small Telegram bot that allows you to publish posts in a new...