Table of contents:

How to create a bot on Telegram
How to create a bot on Telegram
Anonim

You will find step-by-step instructions and a setup example.

How to create a bot on Telegram
How to create a bot on Telegram

What you need to know before creating a bot on Telegram

Bots are a kind of programs that can perform various functions - from providing information to managing devices - and work directly in the messenger.

Interaction is carried out both with the help of a pre-prepared set of commands, and in the form of live communication. Depending on the tasks assigned to the bot, it can be added to a channel or chat, as well as connected to automation platforms and various services. More sophisticated capabilities are implemented using programmable scripts that are provided by the developers.

But one way or another, you first need to create a bot. This is done as follows.

How to create a bot on Telegram

How to create a bot on Telegram: find BotFather
How to create a bot on Telegram: find BotFather

To create your own bot, you need another bot - BotFather. It is the official tool for creating and managing bots. You can find BotFather through the search. Pay attention to the blue check mark next to the name: it will point to the correct chat.

How to create a bot in Telegram: click "Start"
How to create a bot in Telegram: click "Start"

Start a dialogue with him and click "Start".

How to create a bot in Telegram: select / newbot
How to create a bot in Telegram: select / newbot

Click on the menu button and select / newbot.

Name the bot
Name the bot

BotFather will ask you to name your bot. Enter the desired name and click "Submit".

How to create a bot on Telegram: come up with a nickname
How to create a bot on Telegram: come up with a nickname

The next step is to come up with a nickname for the bot. It must be unique and end with bot. If these conditions are not met, BotFather asks you to compose another one.

Get link and token
Get link and token

Next, BotFather will provide a link to the created bot and a token for accessing it. The link is needed to find a bot, you can share it. But a token - a long set of symbols - is a secret thing. This is a kind of key used to control the program. Save it in a safe place and do not show it to anyone.

How to create a bot in Telegram: go to the dialogue
How to create a bot in Telegram: go to the dialogue

After that, in fact, you can work with the bot. If you click on the link given in the previous step, a dialog with it will open. True, without tuning, he will not be able to do anything yet.

How to set up a bot on Telegram

Depending on what you need a bot for, it will need to be connected to various services and automation platforms. To do this, during the configuration process, you will need to specify the name of the bot and its token.

Set up your bot
Set up your bot

Also, if you wish, you can add a description (/ setdescription), attach an avatar (/ setuserpic) or change the name (/ setname). All these actions are carried out through the menu in BotFather. If you have several bots, then first you have to select the one you want from the list.

As an illustrative example, we will create a simple chatbot using a free service. It does not require programming skills and works directly in Telegram. Our bot will offer useful information for readers: Lifehacker's books and podcasts, as well as open vacancies and the possibility of contacting the editors. The principle of operation is simple: the user goes to the desired chat using a link, starts one of the commands by clicking on a button in the menu, and receives an answer to his question. These are the steps involved in setting up.

Bot connection

How to set up a chatbot in Telegram: click "Start"
How to set up a chatbot in Telegram: click "Start"

First you need to open a chat with Manybot by going to, and click "Start".

How to set up a chatbot in Telegram: select a language
How to set up a chatbot in Telegram: select a language

Then choose a language that is convenient for you.

Click "Add New Bot"
Click "Add New Bot"

Click "Add new bot".

How to set up a chatbot in Telegram: click "I copied a token"
How to set up a chatbot in Telegram: click "I copied a token"

But now you need the token of the previously created bot, which was issued by BotFather. Click "I copied a token" and submit it to Manybot.

How to set up a chat bot in Telegram: add a description of the bot
How to set up a chat bot in Telegram: add a description of the bot

Add a description of the bot for users to see, or skip this step.

Creation of teams

Click "Get Started"
Click "Get Started"

Next, go back to your bot, which you created with BotFather, and click "Start".

How to set up a chatbot in Telegram: select "Custom commands"
How to set up a chatbot in Telegram: select "Custom commands"

Select Custom Commands.

Click "Create Team"
Click "Create Team"

Then - "Create a team".

How to set up a chatbot in Telegram: come up with a team name
How to set up a chatbot in Telegram: come up with a team name

Think of the team name in Latin letters, starting with a slash.

Enter your text
Enter your text

Enter text, add links or photos that the user will see after calling the command. There can be several messages. Click Submit and then Save.

In the same way, add the rest of the commands that you need through the New Command menu. In our example, these are podcasts, jobs, and feedback.

Adding buttons to menus

How to set up a chatbot in Telegram: click "Configure chap. menu"
How to set up a chatbot in Telegram: click "Configure chap. menu"

To enable users to interact with the bot through a graphical interface rather than entering commands manually, you need to add buttons for each of them. To do this, click "Configure chap. menu".

Click "Add Menu Item"
Click "Add Menu Item"

Click on "Add Menu Item".

How to set up a chatbot in Telegram: select the desired command
How to set up a chatbot in Telegram: select the desired command

Select the command you want.

Come up with a name for the button
Come up with a name for the button

Come up with a name for the button and click Submit.

Add buttons for other commands in the same way.

Checking bot operation

Follow the link to the bot. Users will see only the added commands, while you will have an extended menu with settings.

Test the bot
Test the bot
Test the bot
Test the bot

You can test the bot from our example and see how working with it looks like by following the link.

Recommended: