- Log in to personal account.
- Create the bot script.
- Create a text bot.
- Register or log in to Telegram.
- Open Telegram messenger.
- Search for and open the system bot @BotFather, which is used to create and manage custom bots.
- Click the Start button. General information about the system bot will be displayed, as well as a list of commands for creating and managing custom bots in Telegram.
- Click on the /newbot.
- Set a name for your bot. For example, GoodTariffBot.
- Specify a bot name that starts with @ and ends with bot. This name will be used in the reference to your bot. For example, if you specified the name @GoodTariffBot, your bot will be available at the link: t.me/GoodTariffBot.
You will receive a message with a link to your bot and a token that you will need to bind your bot to the chat room.
The bot name must be unique.
- Click the token to copy it.
In the bot's settingsIn the Integrations section
-
Go to the Text Bots section of personal account.
-
Go to the integration in one of the following ways:
- Directly: hover over the chat line and click
→ Integration.
- From Chat Edit: Hover over the chat line and click
. Click the Integration tab.
-
On the Telegram tab, paste the token you copied earlier into the Access Key (authToken) field.
-
Turn on the Use this integration toggle. The bot will be bound and enabled.
Follow the order of steps: first insert the token and only then click Use this integration - otherwise the bot will not be connected.
- Go to the Integrations section of personal account.
- Click the Telegram tab.
- Click Add integration or
in the upper left corner. This will open the integration settings dialog box.
- Select a text bot from the drop-down list in the Chat name field in the window that opens.
- Paste the previously copied token into the Access key (authToken) field.
- Click Save. The bot will be bound and enabled.
- Go to Telegram using the link to the previously created bot.
- Click Start.
- Test the dialog.
Bot name = the name of the chat with this bot.
To change the name of your bot, follow these steps:
- Open the bot @BotFather in Telegram.
- Type or select the command /setname.
- Select the name of the bot whose name you want to change.
- Enter a new name for your bot. BotFather will send a message: "Success! Name updated."
- Open your bot and check that its name has changed.
An avatar is an image that is used as a visual representation of the bot. Upload an avatar to make the bot more recognizable. Customers will be able to find dialogs with him in their chat list faster.
To upload an avatar, follow these steps:
- Open the @BotFather bot in Telegram.
- Type or select the command /setuserpic.
- Select the bot for which you want to upload an avatar.
- Select and send the image you want to set as the avatar for the bot.
The avatar must be sent as an image, not a file. Otherwise, the bot will not process the file and will ask you to send the image in the appropriate format.
After sending the image, the bot will set it as your bot avatar and notify you of success.
5. Open your bot and check that it has an avatar.
With a welcome message, you can tell users what your bot can do and what it can be useful for. Users can read this information before the dialog begins.
To create a welcome message for your bot, follow these steps:
- Open the @BotFather bot in Telegram.
- Type or select the /setdescription command.
- Select the bot for which you want to create a welcome message.
- Enter and send the text of the welcome message. BotFather will send the following message: "Success! Description updated".
- Open your bot and check that the welcome message has appeared in the dialog.
The description will tell users about your bot and will be displayed as a short introduction. When a user receives a message that contains a link to your bot, the bot's description is displayed along with that link.
To add a bot's description to your bot's profile, follow these steps:
- Open the bot @BotFather in Telegram.
- Type or select /setabouttext.
- Select the bot for which you want to add a description.
- Enter and send the description text. BotFather should send the following message: "Success! About section updated".
- Open your bot and check that the bot info shows the description (click on the bot's name or avatar to go to the info).