In this tutorial, weβre going to deploy a very simple File To Link bot created using Python and deploy it on Heroku server π
Requirements π
1. Telegram Credentials
Go to https://my.telegram.org/auth
Enter your Phone Number and Click on Next You’ll recieve Confirmation code in your Telegram Account. Enter the Code in Confirmation code Box and Click Sign In
Click on API development tools and Copy App api_id and App api_hash
(Warning: Do not share your API details to anyone.)
Start @botfather and create a new bot.
- Send
/newbot - Send Your Bot’s Name
- You will get replay to send username for your bot. Now Send a username end with
bot - Copy the Bot Token your received
Send /getid to @myidbot
it will reply with your ID
eg: Your own ID is: 849814747
849814747is my ID
Create a New Private Channel
To Create a New Channel: β° (if your on mobile Click on Pencil Pencil icon) -> New Channel -> Create or β -> Private Channel -> Save or β -> Add Your Bot Created Using @botfather -> add or β
Send a Message to Now Created Channel and Forward it to @message_ids_bot
You will get your Channel ID with reply
2. DATABASE_URL
No Guide Available by Me Below are Some Video and Blog you can use to Create MongoDB URI
- Video by me But Outdated you can use this to Create MongoDB URI
- MongoDB How to (article)
- How To Create MongoDB Database Url (Youtube Video)
3. Heroku Account
Go to https://signup.heroku.com/login and fill as shown in the picture below to signup, then you’ll get a confirmation on your mail, complete the confirmation to activate your heroku account.
Deploying app π
Open https://github.com/avipatilpro/FileStreamBot
click on
Deploy on Heroku : –>
Enter Value’s in Given Field’s π
- App name: `Enter a App Name for your Heroku app`
- Choose a region: `choose a location near to you`
- API_HASH: API_HASH your received from above step
- API_ID: API_ID your received from above step
- APP_NAME: Copy-Paste the app name that you just typed above.
- BIN_CHANNEL: Channel ID Received from above Step
- BOT_TOKEN: BOT_TOKEN your received from above step
- DATABASE_URL: mongodb_uri of your MongoDB DataBase
- OWNER_ID: Your user id
Config Vars
now click on
Congratulations you have Deployed FileStreamBot Successfully
If Your Facing any Problem contact me: Click Here