Commands/Actions
An action is an event initiated by a user, such as sending a command, clicking a button (callback), sending a message, etc. Graspil automatically logs all user actions, and statistics on these actions can be viewed in various reports, such as the actions report.
Some actions require additional processing and configuration.
Regular Text Messages
The problem with regular messages is that it is difficult to determine whether they are a “command” or just part of a conversation.
Here are a couple of examples:
Sending the word “Help” in the chat: In many bots, this word may be equivalent to the command “
/help
” and triggers a help script for the user. In this case, the word “Help” should be considered a command, and statistics should be collected on it.Suppose your bot is designed for user support, and they simply write about their issues, such as “problem at Peace Street.” In this case, the message should not be processed as a command.
In the “Advanced” plan, all user messages are saved, not just commands.
To solve this problem, we created a simple algorithm. If the same message repeats several times, it is converted into a “command” and starts appearing in reports. We call such commands “hidden commands.”
Disabling Hidden Commands
For some bots, this feature may be unnecessary or even harmful. For example, if you have many users who write a lot to your bot, such as user communication bots or bots providing AI services.
In these cases, too many commands might be created, hindering adequate data analysis. If your bot does not need to account for such commands, you can disable this feature on the bot settings page.
If you want to further configure these commands, contact us. We are gathering information to develop a universal, customizable solution.
Hidden Command Settings
You can manage the list of hidden bot commands. These settings can be found on your bot’s settings page.
You will see a list of all your bot’s commands. Each command has a status:
On – Active commands that will generate events.
Off – Disabled commands that will not generate events.
In progress – Detected commands that have not yet been created. If a command is repeated enough times, it will automatically become active.
Adding Your Own Commands
You don’t have to wait for commands to be created automatically. You can manually add them or activate commands that are currently In progress
CALLBACK_QUERY
Telegram has different types of buttons, and one of these types is CALLBACK_QUERY. When a user clicks such a button, a request with some information is sent to your bot.
These events are logged without additional processing, and the command is displayed as the button text. However, there is a small peculiarity: we have a character limit. If the command (button text) exceeds a certain number of characters, it is not registered as a separate command. You can change this parameter for a specific bot in the settings; by default, this value is 60 characters.
Last updated