> For the complete documentation index, see [llms.txt](https://docs.graspil.com/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graspil.com/en/app/actions.md).

# Commands/Actions

An action is an event initiated by the user, for example: sending a command, clicking a button (callback), sending a message, etc.

Graspil automatically records all user actions; statistics on them can be seen in various reports, for example in the [actions report](https://app.graspil.com/reports/messages_from_user).

Some actions require additional processing and configuration.

### Regular text messages

The problem with regular messages is that it's hard to tell whether it's a "command" or just part of a conversation.\
\
**A couple of examples:**

1. Sending the word "**Help**" to the chat — in many bots, this word can act like the "`/help`" command and triggers some kind of help script for the user. In this case, we should treat the word "Help" as a command and collect statistics on it.
2. Suppose your bot is designed for user support, and people simply write about their problems, e.g. "issue at 123 Main Street" — in this case, the message shouldn't be processed as a command.

{% hint style="info" %}
On the "Advanced" plan, all user messages are saved, not just commands.
{% endhint %}

To solve this problem, we built a simple algorithm. If the same message repeats several times, it gets converted into a "**command**" and starts appearing in reports. We call such commands "**hidden commands**".

### Disabling hidden commands

For some bots, this feature can be unnecessary or even harmful. For example, if you have a large number of users who write a lot to your bot. These could be bots for user-to-user communication or ones providing AI services.

In these cases, too many such commands might get created, hindering proper data analysis. If you don't need to track such commands for your bot, you can disable this on the bot settings page.

{% hint style="warning" %}
If you'd like to further customize these commands, write to us — we're gathering information to build a universal, configurable solution.
{% endhint %}

### Configuring hidden commands

You can manage the list of your bot's hidden commands; you'll find these settings on your bot's settings page.

You'll see a list of all your bot's commands. Each command has a status:

<kbd><mark style="background-color:green;">On<mark style="background-color:green;"></kbd> - active commands; events will be created for these commands

<kbd><mark style="background-color:red;">Off<mark style="background-color:red;"></kbd> - disabled commands; no events will be created for these commands

<kbd><mark style="background-color:yellow;">In progress<mark style="background-color:yellow;"></kbd> - these are detected commands that haven't been created yet. Once it repeats enough times, such a command gets converted into an active one.

**Adding your own commands**

You don't have to wait for automatic command creation — you can add commands manually or activate them if a command is "in progress"

### CALLBACK\_QUERY

Telegram has different types of buttons, and one of them is CALLBACK\_QUERY. When a user clicks such a button, a request with some information is sent to your bot.

These events are recorded without additional processing; the text on the button is shown as the command.

There's one small caveat though — we have a limit on the number of characters. If the length of the command (the text on the button) exceeds a certain number of characters, it won't be recorded as a separate command. You can change this parameter for a specific bot in the settings; the default value is 60 characters
