A powerful, production-ready Telegram bot to mention all group members or admins, with a beautiful settings menu, MongoDB integration, and full deployment support for Heroku, Koyeb, and Docker.
- Group & Admin Mention: Use
@all,#all,@admin,#adminto mention everyone or just admins. - Settings Menu: Inline keyboard for message format, silent mention, and bot access (admins only).
- Owner Commands:
/broadcast(send to all users/groups),/stats(bot stats, user/group list). - Cancel & Help:
/cancelto stop,/helpfor instructions. - MongoDB Integration: Tracks users, groups, command history, and boot logs.
- Markdown/HTML Detection: Broadcasts auto-detect formatting.
- Health Check Web Server: For Koyeb/Heroku deployment.
- Production Ready: Robust error handling, logging, and modular code.
/
├── config.py
├── requirements.txt
├── Dockerfile
├── docker-compose.yml
├── app.json
├── startup
├── webapp.py
├── README.md
└── bot/
├── __main__.py
├── __init__.py
├── database/
├── handlers/
└── modules/
- Clone the repo:
git clone https://github.com/yourusername/mention-bot.git cd mention-bot - Install dependencies:
pip install -r requirements.txt
- Configure: Edit
config.pywith your bot token, MongoDB URI, and owner ID. - Run the bot:
python -m bot
- Click Deploy to Heroku or use the Heroku CLI:
- Set
BOT_TOKEN,MONGODB_URI,OWNER_IDin Heroku config vars. - The
app.jsonandstartupscript are ready for Heroku.
- Deploy as a Python web service.
- Set
BOT_TOKEN,MONGODB_URI,OWNER_IDas environment variables. - The bot exposes
/and/healthendpoints for health checks.
- Build and run with Docker Compose:
docker-compose up --build
- Message Format: Small (5 at a time) or Big (max allowed by Telegram)
- Silent Mention: On (silent) or Off (normal @user)
- Bot Access: Admins only or All users
| Command | Description |
|---|---|
@all, #all |
Mention all group members |
@admin, #admin |
Mention all admins |
/help |
Show help and instructions |
/settings |
Settings menu (admins only) |
/cancel |
Cancel running command |
/broadcast |
Owner only: broadcast message |
/stats |
Owner only: show bot stats and chat list |
Pull requests and issues are welcome! Please open an issue for bugs or feature requests.
MIT
Made with ❤️ for Telegram communities
