From 35a4566189e30f2bbd20d6b1fd175c448e0cdc5d Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 17 Jan 2023 14:00:55 +0100 Subject: [PATCH] Fix: update readme --- README.md | 2 +- config.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d905c8c..83584c3 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ Fast, simple, async php telegram api server: 1. `php server.php` ## First start -1. Ctrl + C to stop TelegramApiServer if running. 1. Get app_id and app_hash at [my.telegram.org](https://my.telegram.org/). Only one app_id needed for any amount of users and bots. +1. Create .env file: `cp .env.docker.exaple .env.docker` or `cp .env.exaple .env` 1. Fill app_id and app_hash in `.env.docker` or `.env`. 1. Start TelegramApiServer in cli: * docker: diff --git a/config.php b/config.php index aa4ade3..a71875f 100644 --- a/config.php +++ b/config.php @@ -78,7 +78,7 @@ if (empty($settings['telegram']['connection_settings']['all']['proxy_extra']['ad } if (empty($settings['telegram']['app_info']['api_id'])) { - unset($settings['telegram']['app_info']); + throw new InvalidArgumentException('Need to fill TELEGRAM_API_ID in .env.docker or .env'); } return $settings; \ No newline at end of file