• Модуль: imbot
  • Путь к файлу: ~/bitrix/modules/imbot/lib/bot/base.php
  • Класс: BitrixImBotBotBase
  • Вызов: Base::setBotId
static function setBotId($id)
{
	$class = self::getClassName();
	if (!$class::BOT_CODE)
	{
		return false;
	}

	$optionId = $class::BOT_CODE. '_bot_id';
	if ($id > 0)
	{
		Option::set(self::MODULE_ID, $optionId, $id);
	}
	else
	{
		Option::delete(self::MODULE_ID, ['name' => $optionId]);
	}

	return true;
}