In previous articles (part 1, part2) we created chatbot for Telegram. As I promised, here we will configure some settings of our bot:
- commands list
- profile photo
- about text
- bot description
Let’s begin by configuring our commands list.
Commands list
Command list represents the commands supported by the bot. Telegram suggests them when user types / in the chat with our bot. Each command in this list has a name, which starts with ‘/’, and a text description. Command name length is limited to 32 characters.
Let’s check our help command to refresh the memory:
So we have 2 commands we need to add to our list. Now we go to @BotFather and type /setc. You should see next:
It appears that BotFather also has this command suggestion and that is how it looks like. Let’s click on suggested command.
Here you should select which bot you want to configure – in my case it’s @repaitMyStuffBot. Click on it and bot asks you to specify commands list in given format. I’ve entered next text:
fix – submit request. E.g.: /fix desc
myrequests – to get submitted request
After sending a message back to the bot it tells us that operation has been successfully finished.
We are done with the configuration and we can test it. To do this, go to chat with your bot and start to type command. You will get a suggestion from your bot (if there is anything to suggest):
It works perfectly!
Chatbot profile picture (userpic)
Currently, we have “RS” in a cycle as a profile image, and I do not like this. Let’s put there something more related to our business.
Steps to change profile picture are pretty similar to setting commands list:
- Open chat with @BotFather
- type /setuserpic
- select your bot
- use clip icon, which is next to the input field, to upload the image
NOTE: I’ve not found any documentation regarding image size limitation for bot profile picture, but 64x64px and 128x128px will not work:
But 256x256px works perfectly – chatbot sends us success message:
Now, to check results you should refresh the page.
Also, profile picture has been updated in Bot profile dialog:
About text
At this point, we have configured command list and profile picture. But profile dialog looks pretty empty. We should do something with it. About text will be shown in the profile of your bot, so users can see, what is the purpose of this bot.
- Open chat with @BotFather
- type /setabouttext
- choose bot
- Write about text
Now we will check profile page one more time.
Description
Another important thing is chatbot description. Do you remember what have you seen when started the chat with your bot for the first time?
It looked smth like this:
Not really user-friendly, right? Let’s fix this. Description will be shown for new users before they start a chat. It should be attractive so they will not close chat but start chatting (that is why we are writing bots, right?). As usually:
- Open chat with @BotFather
- type /setdescription
- select bot
- type description text
Finally, if you clean conversation history with this chatbot, refresh the page and open chat you will see our description:
Much better, right?
Conclusion
In this article, we configured profile picture, about and description texts, commands list. Some of them are needed to improve user experience with our bot, while others – to attract users and force them to use it.
P.S.: will be happy to get questions from you and see you soon.