Chat bot in Telegram — is an automated program that runs inside the Telegram messenger and performs various tasks by interacting with users via text commands or buttons. It can answer questions, provide information, perform automatic actions or interact with other services.
First, you need to add the appropriate commands in the bot settings in @BotFather. This requires:
Then you can add the commands needed for the bot and their description.
Don't have your own bot yet? Do you think that creating a chatbot is difficult?
Sign up now at Gerabot chatbot constructors and create your own chatbot in 15 minutes!
Now it is necessary to connect the chatbot to the bot constructor of your choice (we will analyze the creation of the bot's reaction to commands using the Gerabot constructor as an example).
If you are not yet registered on the service, you need to go to the “chatbot designer” and create an account by clicking “Try for free”. After activating the account, go to it and add the token of your bot that you created in @BotFather.
Now you need to create scripts for each bot command you added to BotFather. To create a script, go to the "Chatbot Scripts" section; and perform the following actions:
It is in the keywords field that you need to write the appropriate command, when running which the bot will display the script. Commands must be written with the sign "/". That is, if you added the “companyinfo” command to @BotFather in the script keywords you need to write “/companyinfo” and, accordingly, the bot will display this script to the user when executing the corresponding command.