Get Mystery Box with random crypto!

Telegram commands to manage bots

2016-11-20 20:01:22
In: News Lifehacks Technologies Functional
Robots (bots, chatbots) are automated accounts which make it easier to solve lots of tasks while working with a messenger. To put it simply, a robot is a small assistant ready to unconditional execution of Telegram commands set by a user. If you cope with this function, it will be possible for you to create an army of assistants for solving various tasks, including text translations, comments, education, information search, answers to the questions, games, entertainment and so on. For example, a bot can offer you a selection of hot news in the morning and recommend watching an interesting film in the evening, or serve as your partner in chess, checkers, dominoes and many other multiplayer games.   In order to realize such functions, bots use the same interfaces as real users. Besides, Telegram bot communication is carried out via standard chats, so you do not need installing additional software.  

Syntax for communication with robots

It is not difficult to start working with some particular chatbots. For doing this, you need to follow these instructions:
  1. Type its full name in a search box (it is sometimes enough to type only a part of a name).
  2. If this bot exists, the system will immediately return a result).
  3. Tap on the botʼs name.
  4. Start private conversation.
  Chatbots can recognize some standard phrases. However, there is a list of Telegram commands for more flexible communication with your bot. They have the following syntax: /function [argument] A slash mark «/» is an obligatory symbol and is always located at the very beginning of a code, the total length of which should be no more than 32 symbols.   It is necessary to understand that each particular bot may have its own developer, so the codes which they recognize are different, as a rule. In order to identify your botʼs functionality, it is necessary to type a slash while having private conversation. Further, you will get a list of supported commands and their description.    

How to work with robots by the example of Sberometer

The Sberometer bot (@SberometerBot) can show stock and official exchange rates, current oil and gold price, and also financial and energy market news. To receive information you are interested in, you need to follow these steps:
  1. Type @sberometerbot in a search box and select it in the list.
  2. Press the «Start» button in a dialogue box.
  3. In order to view functionality, select the «Command list» option and type a slash.
  4. To receive required information, it is necessary to indicate the corresponding function. Moreover, this bot allows using Russian words without a slash. For example:
  • /course - exchange rates for the Russian ruble to USD and EUR;
  • /gold - stock exchange gold price;
  • /oil - stock exchange Brent oil price;
  • /news (topic) – 3 news of a specific topic (for example, /news oil - energy market news).
   

Key Telegram commands for creating bots

The creation of new bots and a change of the old onesʼ settings are carried out by means of the main bot called @BotFather. When you will start communicating with it, you will see the command list in a dialogue box which allows the developers to execute the following manipulations:
  • /newbot– create a new chatbot; • /setname– change a name; • /setdescription – change a description where the botʼs key possibilities are mentioned ; • /setabouttext – point out brief information about the given account; • /setuserpic – choose an account picture; • /setcommands – point out the list of supported functions which will be shown in a dialogue box while typing a slash; • /setjoingroups – a possibility of adding a bot into groups; • /deletebot – robotized account deletion.
    To create a chatbot, you need to type /newbot in a dialogue box. Further, the BotFather bot will ask its full name which will be shown in Telegram chats and contacts, and its username consisting of Latin letters and ending in «bot» (for example, image_bot).  

Global commands

As previously mentioned, every Telegram bot has its unique functionality which allows completing various tasks. At the same time, there exist a range of simple commands which are recognized by practically all robotized accounts:
  • /start – beginning of communication with a user, hello message (in case of using additional arguments, it is possible to extend the given function);
  • /help– help display (brief information about an account, description of possibilities, available function list, etc.);
  • /settings– providing the list of settings available to a user.
  Currently, it is practically impossible to mention the exact number of Telegram bots. Pavel Durov, a founder of the given service, provided all who wish with an opportunity of creating similar assistants for the realization of various tasks, so their number is constantly increasing. When properly used, chatbots become a powerful organizational resource which allows automating recurring action performance.  
1251