Skip to content
/ BroadcastBot Public template

A simple Telegram bot that can broadcast messages and media to the bot subscribers. with mongo DB support

License

Notifications You must be signed in to change notification settings

NACBots/BroadcastBot

Repository files navigation

Broadcast Bot v2

A simple Telegram bot that can broadcast messages and media to the bot subscribers using MongoDB.

Readme Card

🚀 What's New in v2?

  • 15x Faster Broadcasts – Implemented semaphore, making message delivery significantly faster!
  • Live Broadcast Status – Real-time progress updates to track your broadcasts.
  • PyroBlack Migration – Switched from Pyrogram to PyroBlack for improved performance and efficiency.
  • New Config Variables:
    • MAX_CONCURRENT – Maximum concurrent message sends (Default: 15, can be set up to 1000 for paid broadcasts).
    • UPDATE_INTERVAL – Update interval in seconds to avoid flood waits (Default: 2).

Features

  • Supports MongoDB database 💁 for user records 📽.
  • Users can choose whether to enable broadcast messages using /settings command.
  • Logs new users in a specified channel.
  • Get total user count from the database.
  • Ban and unban users.

Required Configs

Optional Configs

  • LOG_CHANNEL - Channel ID to log new user notifications.
  • BROADCAST_AS_COPY - Set to True for copy-forwarded messages, False for forwarded messages with a tag.
  • DB_NAME - Collection name in MongoDB.
  • MAX_CONCURRENT - Maximum concurrent message sends (Default: 15, can be set up to 2000).
  • UPDATE_INTERVAL - Update interval in seconds to avoid flood waits (Default: 2).

User Commands 🤔

start - Start the bot 🥲  
settings - Customize settings  

Admin Commands 🤫

stats - Get total user count in the database  
broadcast - Reply to a message to broadcast  
ban_user - Ban a user with time & reason  
unban_user - Unban a user  
banned_users - Show banned users  

Deploy 🚀

Easiest Heroku Deploy 🤭

herokudeploy-01

Host Locally 🤕

git clone https://github.com/nacbots/BroadcastBot  
cd BroadcastBot  
pip3 install -r requirements.txt  
# EDIT config.py values appropriately  
python3 main.py  

Support Group


Found a Bug? 🐛

Feel free to create a pull request or open an issue and describe your problem freely.

Credits

pyrogram