✪ What is a Telegram Userbot?
A userbot can be said to be your own personal telegram bot to make your life on telegram easier. From helping you manage your groups to simply having fun through animations to uploading files to hosting sites like gDrive, mega, etc. directly from telegram. Consequently, userbot can become an indispensable tool for you.
Although making your own userbot can be tad bit difficult for new users, i’ve tried my best to keep this article noob-friendly with visual references and detailed steps. If you’re still having issues, join this group and have your doubts cleared.
In this tutorial, we will be going through the steps to creating and depoying a userbot, SpEcHiDe’s fork of Uniborg, a famous userbot. The repository for the bot can be found on github. Make sure you read the whole article and you must not skip any part else you get them errors lmao.
1. Join Uniborg’s channel on telegram.
2. A Github Account.
First of all, you must make an account on github.com. I’ll assume that you’re confident in your ability to be able to make an account on github and henceforth, will skip this part here.
3. A Heroku Account.
You’ll also need to make an account on heroku.com. It’s easy. Just get it done with. If you’re having trouble, you should probably stop thinking about getting a userbot.
4. Common sense
Please, just use your common sense 😐 . Although it is said to be “common” sense, once you try teaching people, you’ll frequently wonder if it’s all that common..
✪ Let’s Get started with gathering the necessary information.
Step 1 – Getting the API ID and API Hash.
1 . Go to my.telegram.org. If you’re unable to load page or having issues, use a vpn.
2. Enter you phone number in the international format and submit. You will recieve a login code. Enter that and login.
3. After Logging in, you’ll see three options. Click on Api Development Tools.
4. You’ll see some forms and things. Just fill the “App Title” and “Shortname” and click on “Create Application” Button.
5.You’ll get your API ID and API Hash. These are important. Save them somewhere for future use.
Step 2 – Creating a String Session.
A String Session is basically your session data, stored within a string. You must keep this private. If anyone has your string session, they will be able to access your account.. heck, even delete your account!! For more info on string sessions, refer to telethon docs.
To make a string session, follow the following steps. You must not skip through any part of you’ll face errors. You can also check This for the termux commands.
1 . Download Termux from Google Play Store.
2 . Install Termux lmao
3 . Open termux lmaoo
4 . Enter these commands in termux-
- pkg install python git
- python3 -m venv venv
- . ./venv/bin/activate
- cd /sdcard/Telegram
- git clone https://github.com/spechide/UniBorg
- cd UniBorg
- pip install telethon
- python3 GenerateStringSession.py
5. Follow the on-screen prompts. Remember to put your phone number in international format. If you have 2 factor authorisation enabled, type in your password. It won’t show but it will get inputted
(is this a word?).
You’ll get a really long string. This is your String session. Copy it correctly and save it somewhere. Remember, this must be kept private.
Step 3 – Generating a Telegram Bot Token
Another important, not required though, is generating a telegram bot token. This is highly recommended to use the “.helpme” command, to view the command list.
1 . Go to @Botfather on Telegram.
2 . Enter /start and then /newbot.
3 . Enter a name and a username.
4 . You’ll receive the bot token.
5 . Once done with this, enter /mybots
6 . Select Your Bot.
7 . Select Inline Mode.
8 . Enable Inline Mode.
Step 4 – Forking The repo.
1 . Go to the Uniborg’s repo.
2 . I’d recommend you to use Desktop View. Feels Much Better.
3 . Click on Star on the top right corner.
4 . Then, click on the fork button in the top right corner.
Step 5 – Deploying to Heroku.
1 . Click on the “Deploy to Heroku” button in the readme, at the bottom.
2 . On the deploy page, enter a name for your app. The name doesn’t matter.
3 . Fill the API_HASH with your API Hash, the one we got in Step-1.
4 . Fill the APP_ID with your APP ID, the one we got in Step-1.
5 . Fill the HU_STRING_SESSION with your string, the one we got in Step-2.
6 . Fill the MAX_FLOOD_IN_P_M_s with 6 or 9 or anything else.
7 . Fill the NO_OF_BUTTON with 20.
8 . You might want to clear the SUDO_USERS box. 😛
9 . Fill the TG_BOT_TOKEN_BF_HER with the bot token, the one we got in Step-3.
10. Fill the TG_BOT_TOKEN_USER_NAME with your bot’s username, from Step-3.
11 . Click on the Deploy Button.
With that, your bot is deployed on heroku. I have attached visual references and marked the ones worth filling initially with arrows. Now, we just need to switch on the dynos for your bot.
Step – 6 : Switching on your dyno.
1 . Go to Heroku homepage.
2 . Click on Resources
3 . Click on the pencil. Switch on the dyno.
That’s it! With this, your userbot should be up and running. Send “.helpme” command in any group to test if the bot is working or not. If you have any issues, join this group. Till then, cheers! Also check out our other posts here!
Get real time update about this post categories directly on your device, subscribe now.