public function __construct($token = null, $async = false, $httpClientHandler = null)
{
$this->accessToken = isset($token) ? $token : getenv(static::BOT_TOKEN_ENV_NAME);
if (!$this->accessToken) {
throw new TelegramSDKException('Required "token" not supplied in config and could not find fallback environment variable "' . static::BOT_TOKEN_ENV_NAME . '"');
}
if (isset($async)) {
$this->setAsyncRequest($async);
}
$this->client = new TelegramClient($httpClientHandler);
$this->commandBus = new CommandBus($this);
}