command
Catches a Telegram command, which has been specified as an argument.
Read more about Telegram commands in the official documentation.
command(name=String|Symbol, &block)
command(name=String|Symbol, &block)
Platforms
Platform
Supported
Messenger
Telegram
Usage
Configuration
In order to be implemented in Kogno, the commands must be created first in Telegram through the BotFather or well, by defining them in the configuration file config/platforms/telegram.rb
by modifying config.telegram.commands
field.
Available scopes are: :default
, :all_private_chats
, :all_group_chats
and :all_chat_administrators
. Read more about Commands Scopes on Telegram.
Command Line
Once configured, these changes must be sent to Telegram by running the following command in terminal.
Update all scopes
Update the scopes individually
Routing to Context
Each command can be routed to a specific context, learn how in Routing Chapter.
Last updated