Telenoda for developers RUOpen web version
Bots

Bot features

Commands, buttons, links, groups and channels, inline mode, mini apps and the attachment menu.

Commands

Commands start with “/”. The list set via /setcommands or setMyCommands appears in the menu next to the input field and in suggestions when typing “/”.

Lists can be split by chat and language: separately for private chats, groups, group administrators, one chat or one group member. A user sees the most specific matching list in the language of their app, or the list without a language if there is none. Details are in the Commands section of the reference.

Every bot should support /start — the conversation begins with it — and /help.

Buttons and keyboards

Buttons under a message don't send text to the chat. They open a link, send the bot a callback, copy text, launch a mini app or switch the user to inline mode. A bot can change the buttons in a message it has already sent — that's how menus, paginators and forms are made.

A keyboard instead of the system one offers ready-made replies. A button can request the user's contact or location; the server builds the contact from the account, so someone else's number can't be substituted.

Choose a size:
SML
Size chart

Callbacks

A press on a callback button arrives at the bot as a callback_query. Reply with answerCallbackQuery within 10 seconds: you can show a short notification or an alert, or open a link to the same bot. Without a reply, the loading indicator on the button disappears on its own.

https://me.telenoda.org/bot_name opens a chat with the bot. The parameter ?start=value reaches the bot in the command /start value after the user taps “Start” — this is how referral codes and campaign tags are passed.

https://me.telenoda.org/bot_name?startapp=value immediately opens the bot's main mini app and passes it start_param.

In a chat with a bot, there's a menu button to the left of the input field. It shows the list of commands or launches a mini app — this is configured in “My bots” or with the setChatMenuButton method, either for all chats or for a specific user. Learn more in the Mini apps section.

Groups and channels

A bot is added to a group like a regular member, unless the owner has forbidden this with the /setjoingroups command. A bot can only be added to a channel as an admin; it then receives the channel's posts and can publish its own.

By default, privacy mode is on in groups: the bot receives commands, messages that mention it and replies to its own messages. A bot that is an admin, or one with privacy mode off, receives all messages. Messages from other bots are not delivered to a bot.

A bot acts on its own behalf and with the rights it was given: it can delete messages, restrict members and pin only if it has those rights. The bot learns about being added, removed or having its rights changed from the my_chat_member update.

Inline mode

Enable the mode with the /setinline command. The user types @bot_name query in any chat, the bot receives an inline_query and replies with a list of results: articles, saved photos, videos, GIFs, stickers, documents, locations and contacts. The chosen result is sent to the chat from the user, marked “via @bot_name”.

If a result has buttons, the bot can receive callbacks from them and edit the sent message. Details are in the reference.

Mini apps

A mini app is a bot's web page that opens on top of the chat and receives signed user data. It can be launched with a button under a message, a keyboard button, the menu button, a link with startapp and from the attachment menu. The user can add a mini app shortcut to the home screen. Learn more in the Mini apps section.

Attachment menu

Bots approved by the Telenoda administration can be added to the attachment menu. The bot's mini app then opens from private chats and groups, and the result is sent to that chat on behalf of the user.

Rules

  • A bot can't message a person first — only after the person has started the bot or written to it.
  • A user can block a bot, after which delivery to them stops.
  • Message rate limits apply; if they are exceeded, the API returns error 429.
  • Don't ask users for Telenoda verification codes or PINs.
  • If the bot processes personal data, you as its owner are responsible for complying with the law and must publish your own data processing policy.
  • Bots can be reported. Telenoda moderators can disable a bot, its mini apps or inline mode.