/** * Constructor * * @param string $api_key * @param string $bot_name */ public function __construct($api_key, $bot_name) { if (empty($api_key)) { throw new TelegramException('API KEY not defined!'); } if (empty($bot_name)) { throw new TelegramException('Bot Username not defined!'); } $this->api_key = $api_key; $this->bot_name = $bot_name; //Set default download and upload path $this->setDownloadPath(BASE_PATH . '/../Download'); $this->setUploadPath(BASE_PATH . '/../Upload'); //Add default system commands path $this->addCommandsPath(BASE_COMMANDS_PATH . '/SystemCommands'); Request::initialize($this); }
/** * Constructor * * @param string $api_key */ public function __construct($api_key, $bot_name) { if (empty($api_key)) { throw new TelegramException('API KEY not defined!'); } if (empty($bot_name)) { throw new TelegramException('Bot Username not defined!'); } $this->api_key = $api_key; $this->bot_name = $bot_name; //Set default download and upload dir $this->setDownloadPath(BASE_PATH . "/../Download"); $this->setUploadPath(BASE_PATH . "/../Upload"); Request::initialize($this); }
/** * Constructor * * @param string $api_key */ public function __construct($api_key, $bot_name) { if (empty($api_key)) { throw new TelegramException('API KEY not defined!'); } if (empty($bot_name)) { throw new TelegramException('Bot Username not defined!'); } $this->api_key = $api_key; $this->bot_name = $bot_name; Request::initialize($this); }
/** * Constructor * * @param string $api_key */ public function __construct($api_key) { $this->api_key = $api_key; Request::initialize($this); }