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-developers.com/showthread.php

How To Enable Dark Mode On Instagram - Android & IOS

Instagram is the most popular and widely used social app in the world and is gradually growing in India And Abroad. A lot of people use this social app on daily Basis to Connect and Share Pictures With Others and it is also used to Advertise and Promote Products and services.The Basic and Simple Plus Attractive user Interface Makes it Easy and a Pleasureful experience to promote Delightful Environment. Instagram is used by Professionals, Models, Advertisers and Many Different People relating to Different Background and Field who want to interact with lots of people on daily basis for Various Reasons and Objectives. Instagram Has A Whitish Kind Of User Interface [UI] and it might be a problem sometime for people using Instagram at night or people having a high brightness phone or people who want to use Instagram in Dark Mode so they might want to enable dark mode on Instagram and use instagram Dark Mode to use instagram more comfortably. Below We are Providing method of using Inst