SmartMonitorBot is the ultimate Telegram channel event tracker, crafted with Pyrofork. This beast monitors your supergroups and channels like a cyber hawk, delivering real-time alerts to the owner for every major action. Powered by Client.get_chat_event_log(), it’s your go-to for staying in control. Rule your Telegram empire with style! 🚀
This project is open-source under the MIT License, but do not copy the code without proper attribution. Instead, fork the repository on GitHub and customize it for your needs. If you use any part of this code, give credit to @ISmartCoder and link back to this repository. Respect the hustle and keep it ethical! 🙏
SmartMonitorBot is loaded with features that make it the slickest Telegram monitoring tool:
- Instant Alerts: Get pinged the moment something happens in your channel. No delays, just raw speed. ⚡️
- All-Seeing Event Tracking: Catches every move, including:
- Title, description, username, or photo changes 📝
- Invite, signature, or slow mode toggles 🔄
- Pinned/unpinned messages 📌
- Edited or deleted messages ✏️🗑️
- Joins, leaves, or invites 👥
- Bans, unbans, admin promotions, or demotions 🚨
- Group calls, sticker sets, linked chats, or location updates 🎙️🌍
- Subscription extensions or pre-history toggles ❄️
- One-Command Start: Hit
/start, and the bot auto-notifies the owner. Zero hassle. 😎 - Deployment Nirvana: Heroku, VPS with
screen, or Docker—pick your vibe. 🐳 - Custom Prefixes: Set prefixes like
!,.,#,,, or/via.env. Make it yours. ⚙️ - Bulletproof Config: Validates required env vars to keep things rock-solid. No crashes allowed. 💪
Here’s the full rundown of what SmartMonitorBot tracks (from EVENT_TYPE_MAP):
| Event Type | What’s Happening? |
|---|---|
ChannelAdminLogEventActionChangeTitle |
Channel title got a glow-up |
ChannelAdminLogEventActionChangeAbout |
Description revamped |
ChannelAdminLogEventActionChangeUsername |
Username switched |
ChannelAdminLogEventActionChangePhoto |
New profile pic dropped |
ChannelAdminLogEventActionToggleInvites |
Invites flipped on/off |
ChannelAdminLogEventActionToggleSignatures |
Signatures toggled |
ChannelAdminLogEventActionUpdatePinned |
Message pinned or unpinned |
ChannelAdminLogEventActionEditMessage |
Message edited |
ChannelAdminLogEventActionDeleteMessage |
Message yeeted |
ChannelAdminLogEventActionParticipantJoin |
New member joined the party |
ChannelAdminLogEventActionParticipantLeave |
Someone ghosted |
ChannelAdminLogEventActionParticipantInvite |
Fresh invite sent |
ChannelAdminLogEventActionParticipantToggleBan |
User banned or unbanned |
ChannelAdminLogEventActionParticipantToggleAdmin |
Admin promoted or demoted |
ChannelAdminLogEventActionChangeStickerSet |
Sticker set swapped |
ChannelAdminLogEventActionTogglePreHistoryHidden |
Pre-history visibility toggled |
ChannelAdminLogEventActionDefaultBannedRights |
Default banned rights updated |
ChannelAdminLogEventActionStartGroupCall |
Group call started |
ChannelAdminLogEventActionEndGroupCall |
Group call ended |
ChannelAdminLogEventActionChangeLinkedChat |
Linked chat switched |
ChannelAdminLogEventActionChangeLocation |
Location updated |
ChannelAdminLogEventActionToggleSlowMode |
Slow mode flipped |
ChannelAdminLogEventActionToggleSubExtend |
Subscription extension toggled |
Here’s the layout of this masterpiece:
SmartMonitorBot/
├── core/ # Core bot logic 💻
│ └── start.py
├── modules/ # Notification magic ✨
│ ├── notify.py
│ └── __init__.py
├── utils/ # Utility spells 🛠️
│ ├── event.py
│ ├── logging_setup.py
│ └── __init__.py
├── sample.env # Env template 📜
├── app.json # Heroku config ⚙️
├── app.py # App entry point 🚪
├── config.py # Config wizardry 🪄
├── docker-compose.yml # Docker setup 🐳
├── Dockerfile # Docker blueprint 📦
├── heroku.yml # Heroku deployment 📡
├── main.py # Main bot engine 🔥
├── Procfile # Heroku process 📋
├── requirements.txt # Dependencies list 📦
├── runtime.txt # Runtime spec ⚡️
├── start.sh # Startup script 🏁
├── user.py # User client logic 👤
└── README.md # This epic guide 📖
- Python 3.8+ (local or VPS)
- Docker & Docker Compose (for containerized deployment)
- Telegram account with admin rights in your supergroup/channel
- API credentials from my.telegram.org
- Bot token from @BotFather
-
Clone the Repo:
git clone https://github.com/TheSmartDevs/SmartMonitorBot.git cd SmartMonitorBot -
Configure
.env:- Copy the sample:
cp sample.env .env
- Add your credentials:
API_ID=your_api_id API_HASH=your_api_hash BOT_TOKEN=your_bot_token SESSION_STRING=your_session_string OWNER_ID=your_user_id CHANNEL_ID=your_channel_id UPDATE_CHANNEL_URL=your_update_channel_url COMMAND_PREFIX=!|.|#|,|/
- Copy the sample:
-
Install Dependencies:
- Local/VPS:
pip install -r requirements.txt
- Docker handles this automatically.
- Local/VPS:
-
Fire It Up:
- Local/VPS:
python main.py
- VPS with
screen(for persistent sessions):Detach withscreen -S SmartMonitorBot python main.py
Ctrl+A, thenD. Reattach with:screen -r SmartMonitorBot
- Docker:
Stop it with:
docker compose up --build --remove-orphans
docker compose down
- Local/VPS:
-
Activate the Bot:
- Send
/startto the bot, and it’ll auto-notify the owner of events. Done deal. ✅
- Send
Launch on Heroku with one click:
- Hit the button above.
- Fill in your
.envvars in Heroku’s dashboard. - Deploy and start owning your channel! 👀
- Install Python and
screen:sudo apt update sudo apt install python3 python3-pip screen
- Clone the repo and set up
.env. - Install dependencies:
pip install -r requirements.txt
- Run in a
screensession:screen -S SmartMonitorBot python main.py
- Detach (
Ctrl+A,D) and check back with:screen -r SmartMonitorBot
- Install Docker & Docker Compose:
sudo apt install docker.io docker-compose
- Clone the repo and configure
.env. - Build and run:
docker compose up --build --remove-orphans
- Shut it down:
docker compose down
Want to make this bot even crazier? Fork the repo, customize, and submit PRs at GitHub. Keep the code tight, add tests, and respect the ethical warning above. Let’s build something epic together! ✅
This project is licensed under the MIT License. See the LICENSE file for details.
- Owner: @ISmartCoder 💀
- Update Channel: t.me/TheSmartDev 👀
Monitor like a boss with SmartMonitorBot! 🔥