How To Create And Use ChatBot In Telegram

Geetha Niharika Reddy
7 min readAug 8, 2021

Telegram is one of the greatest social media platform in these days. People now a days needs privacy and their chats want to be encrypted and who are interested to use more stickers in their chat they are mostly preferred telegram. We know that telegram giving different features like end to end encryption, coming to chat options we can delete our messages in other’s chat too and many more .Here they introduce bot system which means we can create a bot and test in a chat group, its somewhat better to admins for their work in chat group of telegram…

Now i am going to tell you how we can create a chat bot in a telegram

First we have to open the telegram app. After that we have to search for Botfather in a search bar option. Make sure you should not give a small gap between Bot and father. So when it is going to be searched it will shows some chats name like botfather. But you should click on verified tick mark account. We want only that account to create a chatbot and you can ignore other chats.

After clicking the verified account the chat of botfather will be opened and it shows start option like this..

Click on start option the device automatically taken as /start after that it send a message like,

It shows this type of interface in your chat and we have to send a message like /newbot . It recevies our message and give a reply like….

Please choose a name for your bot. Choose your bot name like Mybot, Mychatbot, Magicbot etc….Here when you should enter the botname it must be end with bot .

For example, if you take Mybot if the username is already exits then it won’t take. So you have to create a unique username bot. If you send unique username bot it will take and give a reply like…

Here i have randomly taken Decimus_bot and it accepts my unique username and it sends a message like congrats for newbot and see the above link you can just copy and paste the link somewhere for further use..

Here the below message is token which is important for your privacy and security, this token can be used to access our bot.

Now you have Select the total message and forward. Before forward the message open the search bar option.

Type grouphelpbot without any spaces and it shows so many accounts you should choose starting one…

After searched the chat account click on that and the interface should be appear like this…

Now click on start in this interface which appears like….

Now you can forward the message here after forwarded the message it loads a few seconds and then grouphelpbot will send a message in this chat.. it shows the bot is working in grouphelpbot.

Now you can check is it working or not??

So, go to bot father account or you can search the botfather account in chatbot click the link which is given by the botfather it appears like t.me/Decimus_bot and your bot will opened ,Click on start option the device automatically taken as /start it shows a message like your bot is working . Now we can say the bot is working….

Our bot is successfully created now we can add our bot in groups in the telegram and also we have to give some additional features to our bot.

First you have to select a language to your bot so click on language it shows so many different languages , now I’m clicking on English. Now our bot will work in English.

Next we can add our bot in any one of the group in the telegram. i just created a demo group like study group for this bot. Now add the bot and adding is not enough for working you must promote it like admin . Again you will search with botname in the search bar if it shows your group then select and click on tickmark.Next add…It shows our interface like this…we successfuly added our bot to the group…

It is asking like make me as admin that’s i can reply to your commands or can can access your commands , otherwise it is impossible.

So, now we can promote our bot as admin like we have to do a long press on bot then it will shows a pop up promote as admin, change permission, remove from group. Select promote to admin.

After that we have to give Admin Rights to bot which means permissions we can manage in this admin rights. Next after giving all the permissions in admin right just click on tick mark which is at right-top corner of the interface.

Now our bot is promoted to admin….

Let us give some commands to the bot. Never forget that you have to give the commands by using / symbol. I give two commands but the bot doesn’t give any response….Because we could not set the coding for bot.

Now you can set the commands. Go to the search bar and type manybot without give anyspace.

Click the account and start the account, they give menu option,we can choose our own menu to our bot.

Click on create a new bot after that it shows two options choose and click on i’ve copied the API token .Now go to botfather chat copy the api code paste in the chat.

It will ask you like write some description for the bot in this chat?? you can give few words about the bot .It send like your bot is ready…it is working without adding in the group.if anyone can search our bot with name and give some commands to this bot whatever we set the coding to bot that messages will be send replies to that person.Now bot is ready!!!!

Now give some custom commands to the bot. Open the My bot and send the command called /newcommand which appears like….

If you want to read then go otherwise skip above commands and click on custom commands it ask to create command and give create command it will shows some example, if the user type /……. something what ever we set that cutsom message that will be sent to user.

For example, if i give /hi it gives some custom message to me…it asks to save,if i save like this…it is succesfully created and add to menu…

Give /hi and it shows it is custom command now click on view command.what we set the command that will appear in the chat.Now we can check in the group how it will work…give commands like /hi the bot automatically gives reply what we set the command to the user…

So, There is a lot of different types of bots and commands are there……You can add soo much of commands to your bot….So this is how we can create and use the bot with this type of commands…

Thank You !

--

--