Skip to content

ItsOrv/Telegram-Panel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

648 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Telegram Panel

Centralized management for multiple Telegram accounts: monitoring, bulk operations, and automation from a single control plane.

Python Telethon License: MIT Tests

🌐 TelegramOS: the full platform at telegramos.orvteam.com BETA

A hosted platform that goes far beyond this panel:

  • πŸ›’ Ready-made & rentable accounts: activate pre-warmed, aged Telegram accounts from a built-in marketplace, or bring your own.
  • 🧩 No-code visual bot builder: design bots and multi-step automations with a drag-and-drop flow editor, no programming required.
  • πŸ›‘οΈ Anti-ban built for scale: safely operate large fleets of accounts, not just a handful.

β†’ Open TelegramOS


Overview

Telegram Panel is a self-hostable system for operating many Telegram accounts from one place. It exposes the same feature set through three interfaces, so you can pick whatever fits your workflow:

Interface Best for Entry point
πŸ€– Telegram Bot Access from any device, on the go python main.py
πŸ–₯️ Interactive CLI A menu-driven terminal UI on your server python interactive_cli.py
⚑ Command CLI Scripting & automation python cli_main.py …

⚠️ Planning to run more than a few accounts? When you self-host this panel, every account connects through the same server IP and the same device signature. Telegram sees both the IP and the device fingerprint of each session, so all your accounts look like they share one machine. In practice, running more than ~3 accounts this way often gets them rate-limited or banned.

TelegramOS is built to solve exactly this. Each account runs in its own isolated, Windows-like environment (a distinct device fingerprint per account) behind a dedicated residential IP, so every account looks like a real, independent device on a real connection and stays safe even at high account counts. It also includes a rentable-account marketplace and a no-code visual bot builder.


Features

  • Account management: add, enable/disable, and persist multiple accounts, with automatic recovery of saved sessions and detection/cleanup of revoked ones.
  • Message monitoring: keyword-based filtering across all active accounts, with real-time forwarding to a designated channel and a per-user ignore list.
  • Bulk operations: run an action across N accounts at once (reactions, poll votes, join/leave, block, private messages, and comments).
  • Individual operations: target a single account for any of the same actions.
  • Statistics & reporting: account health, groups per account, keyword overview, and status reports.
  • Resilient by design: concurrency limits, FloodWait handling, graceful degradation, and structured logging.

Quick Start

Requires Python 3.8+, Telegram API credentials from my.telegram.org, and a bot token from @BotFather.

# 1. Clone
git clone https://github.com/ItsOrv/Telegram-Panel.git
cd Telegram-Panel

# 2. Create an isolated environment
python3 -m venv venv
source venv/bin/activate          # Windows: venv\Scripts\activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Configure
cp env.example .env               # then edit .env (see below)

# 5. Run (choose one)
python main.py                    # Telegram bot
python interactive_cli.py         # Interactive terminal UI
python cli_main.py --help         # Command-line interface

Minimal .env:

API_ID=your_api_id
API_HASH=your_api_hash
BOT_TOKEN=your_bot_token
ADMIN_ID=your_telegram_user_id
CHANNEL_ID=@your_channel          # optional, for message forwarding

Configuration

Variable Required Default Description
API_ID βœ… β€” Telegram API ID from my.telegram.org
API_HASH βœ… β€” Telegram API Hash from my.telegram.org
BOT_TOKEN βœ… β€” Bot token from @BotFather
ADMIN_ID βœ… β€” Your Telegram user ID (only this user may control the bot)
CHANNEL_ID βž– β€” Channel ID/username for forwarded messages
BOT_SESSION_NAME βž– bot_session Bot session filename
CLIENTS_JSON_PATH βž– clients.json Path to the accounts/config file
RATE_LIMIT_SLEEP βž– 60 Rate-limit delay (seconds)
GROUPS_BATCH_SIZE βž– 10 Batch size for group scans
GROUPS_UPDATE_SLEEP βž– 60 Group update interval (seconds)
REPORT_CHECK_BOT βž– β€” Bot username/ID used for report-status checks

Runtime state lives in clients.json: TARGET_GROUPS, KEYWORDS, IGNORE_USERS, clients, and inactive_accounts.


Usage

Telegram bot

python main.py

Send /start to your bot (only ADMIN_ID is authorized) and navigate the inline menu: Account Management, Individual, Bulk, Monitor Mode, and Report Status.

Command-line examples

# List configured accounts
python cli_main.py list-accounts

# Add an account (interactive login)
python cli_main.py add-account +1234567890

# React with 5 accounts to a message
python cli_main.py bulk reaction 5 "https://t.me/c/123456/789" πŸ‘

# Vote in a poll with a single account
python cli_main.py individual vote my_session "https://t.me/channel/42" 2

Full command reference: docs/CLI.md Β· Interactive guide: docs/INTERACTIVE_CLI.md


Architecture

Telegram-Panel/
β”œβ”€β”€ main.py                # Bot entry point
β”œβ”€β”€ cli_main.py            # Command-line entry point
β”œβ”€β”€ interactive_cli.py     # Interactive TUI entry point
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Telbot.py          # Orchestrator: startup, handlers, reconnection
β”‚   β”œβ”€β”€ Client.py          # Session & account lifecycle (SessionManager)
β”‚   β”œβ”€β”€ Handlers.py        # Command / callback / message routing
β”‚   β”œβ”€β”€ actions.py         # Bulk & individual operations
β”‚   β”œβ”€β”€ Monitor.py         # Keyword monitoring & forwarding
β”‚   β”œβ”€β”€ Keyboards.py       # Inline keyboard layouts
β”‚   β”œβ”€β”€ Config.py          # Environment & config management
β”‚   β”œβ”€β”€ Validation.py      # Input validation & sanitization
β”‚   β”œβ”€β”€ utils.py           # Shared helpers
β”‚   └── Logger.py          # Logging setup
β”œβ”€β”€ tests/                 # Test suite (341 tests)
└── docs/                  # Documentation

Built on Telethon with an asyncio-first design: a single event loop per CLI invocation, a bounded concurrency semaphore for bulk work, and lock-guarded shared state.


Testing

pytest tests/                                   # run the suite
pytest tests/ --cov=src --cov-report=html       # with coverage

Security

  • Never commit .env or *.session files; both are git-ignored by default.
  • Only ADMIN_ID can control the bot; all other users are rejected.
  • Keep session files secure and back them up; rotate credentials if exposed.
  • Keep dependencies up to date for security patches.

Contributing

Contributions are welcome. See CONTRIBUTING.md, and please run the test suite before opening a pull request.

License

Released under the MIT License. Β© 2024 ItsOrv.


Need rentable accounts, a no-code bot builder, and ban-safe scaling to many accounts?

⭐ If this project helps you, consider starring the repo.