Skip to content

Introduction to Developing Telegram Bots

Bot is a Telegram user account controlled by a server program.

Bots can have dialogs with users, send messages, reply to commands from users, send pictures, be members of groups and channels, and so on.

Still, bots have some limitations compared to real users, mainly in order to keep users' privacy. For example, bots can't join groups and have to be added by users.

INFO

Although technically bots are users too, in this handbook I use the term "users" to refer to real users.

How to program a bot

Short answer:

  1. Register a bot.
  2. Choose a library for your favorite programming language.
  3. Write code with the help of the library docs and this handbook.

Note that although you can run the bot program on your computer, you will want to use hosting when the code is ready.

The next pages in "Development" section of the handbook describe these steps in details.