Skip to content

Default commands

r0ann3l edited this page Apr 11, 2019 · 2 revisions

Spring Boot Telegram Framework provides some useful commands that will be available in your bot. The list with the available commands by default is below.

Command Description
/help Shows a list with the available commands with a short description next to the command name.
/whoami Identifies a user (by returning the chat ID) who claims to be authorized to use the secure commands.
/close Interferes in the multistage command flow. It sends the command to the active command to close without saving data. Better explained [[here
/done Interferes in the multistage command flow. It sends the command to the active command to close but saving the data. Better explained [[here

Replacing help command

The /help command provided by the framework could be replaced by your own command. An example about this behavior can be found here where the /help command is replaced by the /assistance command. To accomplish this, your command just has to implement the HelpCommand.java interface and the framework will do the rest for you.

Excluding whoami command

The /whoami command can't be replaced by your own command as you do with the /help command, but it could be excluded from the available commands. To accomplish this, simply put in your application.properties this: telegram.commands.exclude=whoami.

Multistage command flow

Commands that interfere in the multistage command flow (/close y /done) will only be available if there are multistage commands available in your bot. By default, there are no mutistage commands and for that reason, those commands will not be available by default. But once you implement some multistage command, these commands will be available in your bot.

Clone this wiki locally