Skip to content
/ Tron Public

A modern telegram userbot based on pyrogram, light weight and smooth

License

Notifications You must be signed in to change notification settings

TronUb/Tron

Repository files navigation

TronUb Logo

Tron Userbot

Repo Size License Python Version Release Maintained Files Commit since

Click below on text to show

• About
This is a telegram userbot which is written in pure python language and it is based on Dan's Pyrogram library.

Now let's understand what is a userbot ?

A userbot is simple program to automate your telegram account. Userbots are same as telegram bots. the difference is that all the functionality & features of a bot is provided in a telegram user account.

You might be thinking, what can a userbot do ? well userbots can do a lots of things for example downloading a video/audio from YouTube, making telegram stickers, stopping unknown users from messaging us, image processing, etc. A userbot is not limited to its features it can be extended more and more, it can do more beyond its limits.

• Necessary vars

API_ID
# get this value from https://my.telegram.org

API_HASH
# get this value from https://my.telegram.org

SESSION
# create session from session methods given below

LOG_CHAT
# make a private group and get its chat id

BOT_TOKEN
# create a bot at https://t.me/BotFather
# and get its bot token
• Deployment ( 2 methods )

1. Deploy on Heroku

Deploy



2. Deploy on Local Machines

Windows:

  1. Install python winget install -e --id Python.Python.3.10

  2. Create virtual environment python3 -m venv tronuserbot

  3. Activate the virtual environment tronuserbot/Scripts/activate & install setuptools pip install setuptools

  4. Go to home path cd

  5. Install git winget install -e --id Git.Git

  6. Clone tronuserbot repo git clone https://github.com/TronUb/Tron

  7. change directory cd Tron & create config.txt file notepad config.txt & fill all details.

  8. Start the tronuserbot installation setup python3 -m main

Linux:

  1. Update and upgrade apt-get update -y && apt-get upgrade -y

  2. Install python apt-get install python3 -y

  3. Create python virtual environment python3 -m venv tronuserbot

  4. Activate python virtual environment source tronuserbot/bin/activate & install setuptools pip install setuptools

  5. Install git apt-get install git

  6. Clone tronuserbot repo git clone https://github.com/TronUb/Tron

  7. Change directory cd Tron & create a config.txt file

  8. Paste your keys and values in config.text file nano config.txt & fill all details.

  9. After pasting all of your information, use Ctrl X and enter Y and again hit enter button.

  10. Start the tronuserbot installation setup python3 -m main

Note: You have to add keys & values in config.txt file same as given below 👇

API_ID=1234567
API_HASH=ad2gb7h9jd99jdu9bdid9djd9jsh8s7h7eo9kbopz
SUDO_USERS=[1252773, 7737382, 1721726]

🎉 Done, Have fun using tronuserbot.



• Session ( 2 methods )
1. Repl method

Repl.it



2. Termux method

  • Run the given command in termux
apt update && apt upgrade && pkg install python3 git && cd $HOME && git clone https://github.com/TronUb/Tron.git && cd Tron && python3 session.py


• Examples
from main import app
from main.core import filters
from main.core.enums import HandlerType


# userbot decorator
@app.on_update(
    handler_type=HandlerType.MESSAGE,
    filters=filters.gen(
        commands="check",
        usage="Check Bot is active or not."
    )
)
async def userbot_check_handler(client, message):
    await message.edit("Bot is Active !")

# The gen filter can be only used by the userbot



# bot decorator
@app.bot.on_update(
    handler_type=HandlerType.MESSAGE,
    filters=filters.command(
        commands="check"
    )
)
async def bot_check_handler(bot, message):
    await bot.send_message(m.chat.id, "Bot is Active !")
• FAQ Will be edited soon.

Warning ⚠️: I will not be responsible for anything that happens with your account, channels, groups, friends, etc, if you get banned or limited, it will be your fault.


• MADE WITH 🎉 BY ࿇•ẞᗴᗩSԵ•࿇