# Telegram bot menu

Ready-made commands are useful in that they make life easier for the user, eliminating the need for manual typing.&#x20;

Here's how it looks in Telegram:

![](/files/JYdPIkBUHjxOQLEkGefo)

To use the menu, you need to click on the icon to the left of the message input field or write a slash / -- the bot will prompt the available commands.&#x20;

{% hint style="info" %}
Note that these commands have the highest priority. They will be executed even if the user was in another chain.
{% endhint %}

## How to add a menu

### 1. Set up a channel&#x20;

To create a command menu for a bot in Telegram:&#x20;

1. Go to the project settings on the "Channels" tab
2. Click on the desired Telegram channel
3. In the "Teams" section, click on the "Add team" button: enter the name of the team and its description.

![Interface adding a menu for channels in Telegram](/files/o1fywCzFwEX7VT2IedFj)

{% hint style="info" %}
**The command format** is fixed - /command. The slash is set by default, the command name can consist of lowercase Latin letters, numbers and \_.
{% endhint %}

### 2. Set up the script&#x20;

Successfully?

Great, now you need to configure the behavior of the bot for each command. To do this, add commands to the script.

Go to the desired script or create a new one, add the "Message from user" block and write the condition:&#x20;

If the user's message **is** /`command` (any command you want here).&#x20;

We connect this block with the action that should be performed when this command is selected (for example, with the menu block).

![In this case, the /start command leads to a welcome and subsequent steps.](/files/kpYkGKdlXCN7n0aL9Hin)

{% hint style="success" %}
It remains only to publish the changes, and your telegram users can easily navigate in the side menu of the bot 👌
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.smartbotpro.io/scripts/telegram-bot-menu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
