Skip to content

BeastBots/MentionBot

Repository files navigation

mention-bot


🚀 Telegram Mention Bot

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.


✨ Features

  • Group & Admin Mention: Use @all, #all, @admin, #admin to 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: /cancel to stop, /help for 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.

🗂️ Project Structure

/
├── config.py
├── requirements.txt
├── Dockerfile
├── docker-compose.yml
├── app.json
├── startup
├── webapp.py
├── README.md
└── bot/
    ├── __main__.py
    ├── __init__.py
    ├── database/
    ├── handlers/
    └── modules/

⚡ Quick Start

  1. Clone the repo:
    git clone https://github.com/yourusername/mention-bot.git
    cd mention-bot
  2. Install dependencies:
    pip install -r requirements.txt
  3. Configure: Edit config.py with your bot token, MongoDB URI, and owner ID.
  4. Run the bot:
    python -m bot

☁️ Deploy

Heroku

  • Click Deploy to Heroku or use the Heroku CLI:
  • Set BOT_TOKEN, MONGODB_URI, OWNER_ID in Heroku config vars.
  • The app.json and startup script are ready for Heroku.

Koyeb

  • Deploy as a Python web service.
  • Set BOT_TOKEN, MONGODB_URI, OWNER_ID as environment variables.
  • The bot exposes / and /health endpoints for health checks.

🐳 Docker

  • Build and run with Docker Compose:
    docker-compose up --build

🛠️ Settings Menu

  • 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

📚 Commands

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

🧑‍💻 Contributing

Pull requests and issues are welcome! Please open an issue for bugs or feature requests.


📄 License

MIT


Made with ❤️ for Telegram communities

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages