> For the complete documentation index, see [llms.txt](https://docs.botdistrikt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.botdistrikt.com/messaging-channels/telegram/telegram-commands.md).

# Telegram Commands

Telegram Bots have a special version of a [persistent menu](broken://pages/-MjJWNqbgKRgZrxTFuZn#persistent-menu) called commands. Commands allow your users to trigger specific stories from your bot.

## /start command

When a user clicks into the your bot on Telegram for the first time, they are presented with the bot's description and a **START** button.&#x20;

Clicking the **START** button is equivalent to typing `/start` to your bot. Therefore, when your user clicks the Start button, the first message they will see that got sent to the bot was the `/start` command itself like this

<figure><img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FJ3NxEf1EWrOqUWcsJN94%2Fcommands%200%20-%20telegram.png?alt=media&amp;token=fab01121-858a-40fd-9669-a045fb096c3f" alt="" width="375"><figcaption><p>The START button</p></figcaption></figure>

<figure><img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FQ1MR0qAbmY2dReJVRU0V%2Fcommands%20-%20telegram.png?alt=media&amp;token=a255a30a-cd7f-426b-891c-dda67e9b80df" alt="" width="375"><figcaption><p>becomes the "/start" command</p></figcaption></figure>

Therefore, `/start` is a default command in every BotDistrikt bot. When the TELEGRAM group of rules is created after linking your bot to Telegram, you will also see a rule automatically generated like this

![Telegram /start command's rule](https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LirAdLo22OkAW9w3tvY%2F-MkGONvBwVFcAayT5X3z%2F-MkGoFB0_zeHx_iopAbE%2FScreenshot%202021-09-23%20at%204.41.07%20PM.png?alt=media\&token=07402820-aeb5-4063-810e-33168222bd10)

This rule just checks if a sent a User sent a message with the text `/start` to the bot, and if so, triggers the bot's default **greeting** story.

## Custom commands

Telegram bots are known well to work with slash commands like `/start`. On BotDistrikt, you may add your own commands and descriptions. Here is an example of how it can be used

![](https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LirAdLo22OkAW9w3tvY%2F-MkGocn-E1lmtkLzYlG_%2F-MkH-cSwvYjXsFXYFRNx%2FScreenshot%202021-09-23%20at%205.35.18%20PM.png?alt=media\&token=2afe9357-1c6e-4ee2-9426-b590358ddc24)

The platform then identifies the Linked Story, based on which rule is selected as the Passing Rule for each command.&#x20;

A good practice is to create a New Rule for each command in the generated TELEGRAM group, and the story you want to trigger for it like this

![Create Telegram Rule](https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LirAdLo22OkAW9w3tvY%2F-MkGocn-E1lmtkLzYlG_%2F-MkH11tjUn3n5Hh2Hm7v%2FScreenshot%202021-09-23%20at%205.39.52%20PM.png?alt=media\&token=627a401c-c575-43e2-8393-8e0643e4c8d6)

From the example above, we create a new rule for each of the **/about**, **/settings**, and **/feedback** commands.
