About Chatbot Commands

We are still updating this page

Some data may be missing — we will complete it soon.

Scope: imbot

Who can execute the method: any user

Commands can be global or local.

Quick navigation: all methods and events

Warning

Attention! To process a command, the application must handle the command addition event ONIMCOMMANDADD.

Global

They work in any dialogue or chat. An example of such a command (COMMON = Y):

/giphy image
        

Calling it in any chat will generate a response from the chatbot, even in a chat where the chatbot is not a member.

Command Selection

Local

They work only in direct messages with the chatbot and in group chats where it is a participant. An example of such a command (COMMON = N):

/help
        

Calling it in the EchoBot (bot.php) will display a list of available commands.

Command Selection

Overview of Methods

Method

Description

imbot.command.register

Registers a new command for the chatbot

imbot.command.unregister

Removes a registered command from the chatbot

imbot.command.update

Updates information about a registered command of the chatbot

imbot.command.answer

Publishes a response to the chatbot command

Event

Triggered

ONIMCOMMANDADD

When a new command is added by the chatbot