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
/start
to 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
.env
vars 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
screen
session: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! π₯