Create. Format. Publish.
A production-ready Telegram Channel Post Maker Bot with a Dark Red & Black Mini App, live formatting preview, colored inline buttons, direct media URL support, and automatic scheduling.
- 🎨 Dark Red & Black Web Mini App: Telegram-native web panel with real-time live preview.
- 🔵🟢🔴 Colored Inline Buttons: Add Default, Primary (Blue), Success (Green), and Danger (Red) inline buttons.
- 🔗 Direct Media URLs: Upload files or paste remote image/video/audio links directly.
- 💾 Smart 48-Hour Drafts: Automatically saves drafts and prunes them after 48 hours to save MongoDB storage.
- 📜 Published Posts History: View and re-load previously published channel posts with 1-click.
- ⏱️ Auto-Delete & Auto-Pin: Scheduled auto-deletion and auto-pinning for channel announcements.
- 🩺 Built-in
/healthCheck: Easy UptimeRobot integration so Render free instances never sleep!
Fork or push this repository to your GitHub account.
- Go to Render Dashboard and click New + → Web Service.
- Connect your GitHub repository.
- Configure the following:
- Environment:
Python 3 - Build Command:
pip install -r requirements.txt - Start Command:
python3 bot.py - Health Check Path:
/health
- Environment:
- Add your Environment Variables (see table below).
- Click Deploy Web Service!
Render free web services enter sleep mode after 15 minutes of inactivity. To keep your bot running 24/7 for free:
- Go to UptimeRobot.com (Free).
- Click Add New Monitor.
- Set:
- Monitor Type:
HTTP(s) - Friendly Name:
Posto Bot Health - URL / IP:
https://YOUR-APP-NAME.onrender.com/health - Monitoring Interval:
Every 5 minutes
- Monitor Type:
- Click Create Monitor.
💡 Done! UptimeRobot will ping
/healthevery 5 minutes, preventing Render from ever sleeping.
Add these in your .env or Render Environment tab:
| Variable | Required | Description | Example |
|---|---|---|---|
BOT_TOKEN |
Yes | Telegram Bot Token from @BotFather | 123456:ABC-DEF... |
API_ID |
Yes | Telegram API ID from my.telegram.org | 12345678 |
API_HASH |
Yes | Telegram API Hash from my.telegram.org | 0123456789abcdef... |
MONGO_URI |
Yes | MongoDB Atlas Connection URI | mongodb+srv://user:pass@cluster.mongodb.net |
DATABASE_NAME |
No | Database name (Default: posto) |
posto |
OWNER_ID |
Yes | Your Telegram numerical User ID | 86742154 |
BASE_URL |
No | Public URL of your deployed Web App | https://your-bot.onrender.com |
PORT |
No | Web port (Default: 8080, Render sets this automatically) |
8080 |
# 1. Clone repo
git clone https://github.com/your-username/posto.git
cd posto
# 2. Install dependencies
pip install -r requirements.txt
# 3. Create .env file & add your keys
cp .env.example .env
# 4. Start Posto
python3 bot.pyOpen http://localhost:8080 in your browser to access the Web Editor!
docker build -t the-posto .
docker run -d -p 8080:8080 --env-file .env the-postoIn your Pyrogram bot scripts, you can send colored buttons:
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from pyrogram.enums import ButtonStyle
buttons = InlineKeyboardMarkup([
[
InlineKeyboardButton(
text="🔵 Primary Button",
url="https://t.me/yourchannel",
style=ButtonStyle.PRIMARY # 🔵 Dark Blue / Accent
)
],
[
InlineKeyboardButton(
text="🟢 Success Button",
url="https://t.me/yourchannel",
style=ButtonStyle.SUCCESS # 🟢 Green
)
],
[
InlineKeyboardButton(
text="🔴 Danger Button",
url="https://t.me/yourchannel",
style=ButtonStyle.DANGER # 🔴 Red
)
]
])
await message.reply("Choose an option:", reply_markup=buttons)/start— Welcome message with Web App button & quick guide./channels— Manage connected channels & verify admin rights./addchannel— Instructions to add the bot as channel admin./help— Full guide and formatting cheat sheet.
This project is licensed under the MIT License.
See the LICENSE file for details.
The Posto • Built for Telegram Creators with ❤️
If you find The Posto useful, consider ⭐ starring the repository.