Skip to content

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.

License

Notifications You must be signed in to change notification settings

TheSmartDevs/SmartMonitorBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ SmartMonitorBot πŸ’€πŸ‘€

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! πŸš€

Python Pyrofork Docker Heroku License Stars Forks Issues Contributors Repo Size


⚠️ Ethical Use Warning

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! πŸ™


✨ Epic Features βœ…

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. πŸ’ͺ

πŸ’€ Events Watched Like a Boss

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

πŸ“‚ Project Structure

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 πŸ“–

πŸš€ Get It Running

Prerequisites βœ…

  • 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

Setup Steps πŸ‘€

  1. Clone the Repo:

    git clone https://github.com/TheSmartDevs/SmartMonitorBot.git
    cd SmartMonitorBot
  2. 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=!|.|#|,|/
      
  3. Install Dependencies:

    • Local/VPS:
      pip install -r requirements.txt
    • Docker handles this automatically.
  4. Fire It Up:

    • Local/VPS:
      python main.py
    • VPS with screen (for persistent sessions):
      screen -S SmartMonitorBot
      python main.py
      Detach with Ctrl+A, then D. Reattach with:
      screen -r SmartMonitorBot
    • Docker:
      docker compose up --build --remove-orphans
      Stop it with:
      docker compose down
  5. Activate the Bot:

    • Send /start to the bot, and it’ll auto-notify the owner of events. Done deal. βœ…

🌐 Deployment Options

Heroku Deployment πŸš€

Launch on Heroku with one click:

Deploy

  1. Hit the button above.
  2. Fill in your .env vars in Heroku’s dashboard.
  3. Deploy and start owning your channel! πŸ‘€

VPS Deployment with screen ❄️

  1. Install Python and screen:
    sudo apt update
    sudo apt install python3 python3-pip screen
  2. Clone the repo and set up .env.
  3. Install dependencies:
    pip install -r requirements.txt
  4. Run in a screen session:
    screen -S SmartMonitorBot
    python main.py
  5. Detach (Ctrl+A, D) and check back with:
    screen -r SmartMonitorBot

Docker Deployment 🐳

  1. Install Docker & Docker Compose:
    sudo apt install docker.io docker-compose
  2. Clone the repo and configure .env.
  3. Build and run:
    docker compose up --build --remove-orphans
  4. Shut it down:
    docker compose down

🀝 Contributing

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! βœ…


πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


πŸ“¬ Connect

Monitor like a boss with SmartMonitorBot! πŸ”₯

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published