Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/im/lib/V2/Bot/ |
Upload File : |
<?php namespace Bitrix\Im\V2\Bot; use Bitrix\Im; use Bitrix\Im\V2\Chat; use Bitrix\Im\V2\Message; use Bitrix\Im\V2\Common\ContextCustomer; use Bitrix\Im\V2\Message\Send\SendingConfig; class BotService { use ContextCustomer; private SendingConfig $sendingConfig; /** * @param SendingConfig|null $sendingConfig */ public function __construct(?SendingConfig $sendingConfig = null) { if ($sendingConfig === null) { $sendingConfig = new SendingConfig(); } $this->sendingConfig = $sendingConfig; } /** * @param Chat $chat * @param Message $message * @return void */ public function runMessageCommand(int $messageId, array $fields): void { $fields['COMMAND_CONTEXT'] = 'TEXTAREA'; $result = Im\Command::onCommandAdd($messageId, $fields); if (!$result) { Im\Bot::onMessageAdd($messageId, $fields); } } }