• Модуль: imbot
  • Путь к файлу: ~/bitrix/modules/imbot/lib/bot/network.php
  • Класс: BitrixImBotBotNetwork
  • Вызов: Network::join
static function join($code, $options = [])
{
	if (!$code)
	{
		return false;
	}

	$botId = self::getNetworkBotId($code, true);
	if ($botId)
	{
		return $botId;
	}

	$result = self::search($code, true);
	if ($result)
	{
		if (!empty($options))
		{
			$result[0]['OPTIONS'] = $options;
		}
		$result = self::register($result[0]);
	}

	return $result;
}