A lightweight Telegram self-bot framework built in Python using :contentReference[oaicite:0]{index=0}.
It allows you to automate actions and run custom commands directly from your own Telegram account — no bot token required.
⚠ Disclaimer: Self-bots operate through your personal Telegram account and may violate Telegram’s Terms of Service if abused. This project is intended for personal automation, testing, and learning purposes only.
- Modular command system
- Easy custom module creation
- Automatic module loading
- Command prefix system
- Optional auto-delete for commands
- AFK auto-reply support
- Translation utilities
- Clean and extensible architecture
- Python 3.8+
- Telegram API credentials
Install dependencies:
pip install -r requirements.txtEdit config.py:
apiid = ""
apihash = ""
openrouterapikey = ""
prefix = "."
autodelete = True
language = "en"
afkmessage = "I'm currently away from my device..."| Setting | Description |
|---|---|
| apiid / apihash | Telegram API credentials |
| prefix | Command prefix |
| autodelete | Automatically deletes command messages |
| language | Default translation language |
| afkmessage | Auto-reply message when AFK |
Start the self-bot:
python init.pyOn the first run, you will be asked to log in using your Telegram phone number and verification code.
TelegramSelfBot/
│
├── modules/ # Custom command modules
├── config.py # Configuration file
├── init.py # Main launcher
├── requirements.txt # Dependencies
└── README.md
Each module inside modules/ should follow this structure:
name = "example"
async def execute(client, message):
await message.reply("Hello from module!")Optional aliases:
aliases = ["ex", "test"]No — it runs as a user self-bot, meaning commands execute from your own account.
Yes, if used responsibly. Never share your credentials.
No license specified — use at your own discretion.
Contributions, improvements, and module ideas are welcome. Feel free to fork and submit pull requests.
Use responsibly. Automation should never be used for spam, harassment, or abuse.