Skip to content
/ TGSelfBot Public

Python-based Telegram userbot framework for command automation.

Notifications You must be signed in to change notification settings

wuws/TGSelfBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📱 TGSelfBot

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.


✨ Features

  • 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

🚀 Installation

Requirements

  • Python 3.8+
  • Telegram API credentials

Install dependencies:

pip install -r requirements.txt

⚙ Configuration

Edit config.py:

apiid = ""
apihash = ""
openrouterapikey = ""
prefix = "."
autodelete = True
language = "en"
afkmessage = "I'm currently away from my device..."

Configuration Fields

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

▶ Running

Start the self-bot:

python init.py

On the first run, you will be asked to log in using your Telegram phone number and verification code.


📁 Project Structure

TelegramSelfBot/
│
├── modules/          # Custom command modules
├── config.py         # Configuration file
├── init.py           # Main launcher
├── requirements.txt  # Dependencies
└── README.md

🧩 Creating Modules

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"]

❓ FAQ

Is this a Telegram bot?

No — it runs as a user self-bot, meaning commands execute from your own account.

Is it safe?

Yes, if used responsibly. Never share your credentials.


📜 License

No license specified — use at your own discretion.


❤️ Contributing

Contributions, improvements, and module ideas are welcome. Feel free to fork and submit pull requests.


⚠ Final Note

Use responsibly. Automation should never be used for spam, harassment, or abuse.

About

Python-based Telegram userbot framework for command automation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages