Last Modified: 13.05.2022
Sends "Chatbot is typing a message...»
function is used here for illustration purposes only. It is taken from the EchoBot
example. You can send a REST command with your own function, or use the BX24.callMethod
These methods of message processing are usually employed when the user is typing something, that is why the ONIMBOTMESSAGEADD
event must be processed.
$result = restCommand('imbot.chat.sendTyping', Array(
'BOT_ID' => 39, // ID of chatbot that sends request. Is optional, there is only one chatbot
'DIALOG_ID' => 1, // Dialogue ID, it is either USER_ID, or chatXX – where XX is chat ID, transmitted in events ONIMBOTMESSAGEADD and ONIMJOINCHAT
true or error.
Possible error codes
||Chatbot not found.
||Dialogue ID not transmitted.