A simple Telegram bot that can broadcast messages and media to the bot subscribers using MongoDB.
- 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).
- 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.
BOT_TOKEN
- Get from @BotFatherAPI_ID
- Get it from telegram.orgAPI_HASH
- Get it from telegram.orgAUTH_USERS
- Authorized user IDs for Admin Commands (separated by spaces).DB_URL
- MongoDB Database URI from mongodb.com
LOG_CHANNEL
- Channel ID to log new user notifications.BROADCAST_AS_COPY
- Set toTrue
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).
start - Start the bot 🥲
settings - Customize settings
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
git clone https://github.com/nacbots/BroadcastBot
cd BroadcastBot
pip3 install -r requirements.txt
# EDIT config.py values appropriately
python3 main.py
Feel free to create a pull request or open an issue and describe your problem freely.