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

How To Take Screenshot On Laptop & How to Screenshot in Windows 10

Whenever you are working in the office or if you are browsing the internet, you might see some relevant information that you might want to save, so it is necessary to know how to take screenshots on laptop computer so that if you see some relevant information on your desktop screen, you can save it on your local network of your laptop computer.Below we will be covering the method of how to take screenshot on laptop computer on windows 7 windows 8 windows 10 for free. There are Several ways of taking Screenshot, We will be discovering the Print screen method which requires no additional software and is quite easy, below we will be having a look at step by step tutorial of how to take screenshot on laptop. Just try to look at the step by step tutorial to know how you can take screenshot i have explained the same method in two ways, 1st method explains how you can take screenshot on windows 7 windows 8 windows 10 in just one picture so that it saves you time and in the 2nd me...

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...

How To Change Instagram Password 2019 [ Android ] [ iOS ]

Instagram is one of the most popular and widely used social app where people share pictures and connect with others.Instagram is free to use and its User interface is very simple and attractive at the same time.You can sign up for instagram or separately or you can use your facebook Credentials to sign in into Instagram. Instagram is very easy to use and sometimes or after a while it is always recommended to change your password and changing password regularly is good for keeping your account safe from being hacked. Keeping your Instagram account updated and changing its password often is good way to make sure that your Instagram account is secure and safe.  Below We have covered the method to change Instagram password on your android as well as iphone step by step with screenshots to explain you the procedure in detailed manner and it will be easy for you to understand. How To Change Instagram Password   Explained - Step 1 :  Open Instagram app or go t...