Longman\TelegramBot\Telegram::__construct PHP Method

__construct() public method

Telegram constructor.
public __construct ( string $api_key, string $bot_name )
$api_key string
$bot_name string
    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);
    }