• 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
2. Deploy on Local Machines
• Windows:
-
Install python
winget install -e --id Python.Python.3.10
-
Create virtual environment
python3 -m venv tronuserbot
-
Activate the virtual environment
tronuserbot/Scripts/activate
& install setuptoolspip install setuptools
-
Go to home path
cd
-
Install git
winget install -e --id Git.Git
-
Clone tronuserbot repo
git clone https://github.com/TronUb/Tron
-
change directory
cd Tron
& create config.txt filenotepad config.txt
& fill all details. -
Start the tronuserbot installation setup
python3 -m main
• Linux:
-
Update and upgrade
apt-get update -y && apt-get upgrade -y
-
Install python
apt-get install python3 -y
-
Create python virtual environment
python3 -m venv tronuserbot
-
Activate python virtual environment
source tronuserbot/bin/activate
& install setuptoolspip install setuptools
-
Install git
apt-get install git
-
Clone tronuserbot repo
git clone https://github.com/TronUb/Tron
-
Change directory
cd Tron
& create a config.txt file -
Paste your keys and values in config.text file
nano config.txt
& fill all details. -
After pasting all of your information, use Ctrl X and enter Y and again hit enter button.
-
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
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
• MADE WITH 🎉 BY ࿇•ẞᗴᗩSԵ•࿇