Skip to main content

Create a Telegram bot using Python and Heroku for FREE

Introduction

Today we will be learning how to create a telegram bot and host it on heroku.

Prerequisites 

  1. A telegram account (duh!)
  2. Some experience with Python (for adding more features to the bot)
  3. A Heroku account -- Sign up here!
  4. A GitHub account -- Sign up here!

Create a telegram bot using Father Bot

  1. Search for @BotFather on Telegram
  2. Send message /newbot
  3. The bot will reply asking for a name for the bot, send whatever you like
  4. Next we have to chose a username for the bot, this must be unique and must end with bot. Example - testbot, telebot
    1. If the username is not unique, it will ask to enter again.
  5. That is it! You will receive a congrats message with a link and a token (copy paste it somewhere!)
  6. Your bot is right now dead and won't respond back :(, it needs a back-end server that is where Heroku comes in.

Deploying on Heroku

  1. Thanks to Kylmakalle, we have a good starter pack for Heroku telegram bot.
  2. Head over to https://github.com/Kylmakalle/heroku-telegram-bot#deploying-via-heroku-dashboard-gui and follow the instructions there.
  3. The starter pack python script has zero features. You can use https://github.com/python-telegram-bot/python-telegram-bot to add features (be sure to check out their wiki pages for documentation)
  4. That's it! Your bot is now alive :)
Thank you for reading this article.
If you have any doubts or questions, post down in the comments section below.
Don't forget to share this post to your friends and check out other awesome posts on tech-theka.blogspot.com


Comments

Popular posts from this blog

VIPER4Android Installation And Set Up Guide

  What you will need for VIPER4Android: The App itself: You can download the latest official APK of VIPER4Android here:  Alternatively, a direct link is usually common:  The APK to download for your version of Android  is clearly marked - make sure you get the right one. IRS Impulse Response Sample files - this is where the magic happens: I’m providing a zip file containing some “Dolby IRS” files I use and that works very well - download and extract this:  https://drive.google.com/file/d/0Bw4IPFHUFpo7M0tDaklueHRibXM/view?usp=sharing There are other IRS files available (search XDA Developers forums) and once you’ve placed the folder on your device to put them all in (I’ll explain that later) you can simply put the .irs files in that folder and try them out to see how they affect the sound output. See here for more IRS files to try out: http://forum.xda-developers.com/showthread.php?t=2191223 http://forum.xda-devel...

Best live TV apps for Android

1. Jio TV Subscription Fees - Free [Jio Sim Recharge offers this app and all other app services for free For the validity time of plan, E.g If you recharge your Sim for 129 Rs for 1 month you get to use this app for free for 1 month.]                            Download Jio TV From Playstore Jio TV is a multimedia application that offers indian and global TeleVision channels to stream for free.Using this app you can have access to 600+ channels available in 15+ languages. It even allows you to watch different types of media content,including TV shows, Latest and Old movies, Live Cricket, hockey, WWE and other sports program live and Broadcast show, both the types are availableto stream any time 24x7. [Note: It is Necessary to have Jio Sim Card to use this App , Without an active Jio Sim Card You Cannot use this app to stream.] 2 . Sony Liv Plan - 07 Days -  ₹ 29       ...

How to delete Instagram Account ( Android ) ( IOS )

Instagram is a most popular social networking service on the planet with over 1 billion active monthly users.lt is third largest social network through which people connects with their friends and colleagues and share photos,videos and stories with everyone who'm you want to. Despite Instagram being the most popular app, a lot of people after using it for a while think of taking a break or to completely disconnect from this platform citing various reasons, be it Bullying, too much data consumption or compromise of privacy or because of malicious and spamming links. So if you also have finally decided to take a brake from instagram permanently or you are just fed up of swiping stories of others, you can decide to delete your own instagram account on temporary or permanent basis, be it individual or business account. Below we are providing the method to delete your instagram account permanently, you just have to follow the method step by step, for making it easy to work w...