From a0ce5c483ee799993e5c7304c17e385f057246a3 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 11 Aug 2017 17:51:56 +0200 Subject: [PATCH] i'm good --- README.md | 38 ++++++++++++++------------------------ bot.php | 2 +- docs/index.md | 38 ++++++++++++++------------------------ 3 files changed, 29 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 7c117b64..3acfd908 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,20 @@ If you're selling a MadelineProto base too, you really should consider donating ### Installation -Read this whole page to install MadelineProto. +``` +git clone https://github.com/danog/MadelineProto +cd MadelineProto +``` + +Now copy .env.example to .env, edit its values, read the docs and take a look at tests/testing.php, bot.php. + +### Dependencies + +To install dependencies install composer and run: +``` +composer update +``` +In the cloned repo. ### Instantiation @@ -610,29 +623,6 @@ MadelineProto can throw lots of different exceptions: * \danog\MadelineProto\TL\Conversion\Exception - Thrown if some param/object can't be converted to/from bot API/TD/TD-CLI format (this includes markdown/html parsing) -### Using on your local machine - -Congratulations, you've made it through the docs! You can now use MadelineProto. - -If you did not actually read them all, do that now, because if you don't read this whole page, you won't be able to use MadelineProto. - - -``` -git clone https://github.com/danog/MadelineProto -cd MadelineProto -``` - -Now copy .env.example to .env, edit its values, read the docs and take a look at tests/testing.php, bot.php. - -### Dependencies - -To install dependencies install composer and run: -``` -composer update -``` -In the cloned repo. - - ## Contributing [Here](https://github.com/danog/MadelineProto/projects/1) you can find this project's roadmap. diff --git a/bot.php b/bot.php index aa0e90fd..bce55aa3 100755 --- a/bot.php +++ b/bot.php @@ -34,7 +34,7 @@ echo 'Wrote '.\danog\MadelineProto\Serialization::serialize('bot.madeline', $Mad $offset = 0; while (true) { $updates = $MadelineProto->API->get_updates(['offset' => $offset, 'limit' => 50, 'timeout' => 0]); // Just like in the bot API, you can specify an offset, a limit and a timeout - //\danog\MadelineProto\Logger::log([$updates]); + \danog\MadelineProto\Logger::log([$updates]); foreach ($updates as $update) { $offset = $update['update_id'] + 1; // Just like in the bot API, the offset must be set to the last update_id switch ($update['update']['_']) { diff --git a/docs/index.md b/docs/index.md index 7c117b64..3acfd908 100644 --- a/docs/index.md +++ b/docs/index.md @@ -96,7 +96,20 @@ If you're selling a MadelineProto base too, you really should consider donating ### Installation -Read this whole page to install MadelineProto. +``` +git clone https://github.com/danog/MadelineProto +cd MadelineProto +``` + +Now copy .env.example to .env, edit its values, read the docs and take a look at tests/testing.php, bot.php. + +### Dependencies + +To install dependencies install composer and run: +``` +composer update +``` +In the cloned repo. ### Instantiation @@ -610,29 +623,6 @@ MadelineProto can throw lots of different exceptions: * \danog\MadelineProto\TL\Conversion\Exception - Thrown if some param/object can't be converted to/from bot API/TD/TD-CLI format (this includes markdown/html parsing) -### Using on your local machine - -Congratulations, you've made it through the docs! You can now use MadelineProto. - -If you did not actually read them all, do that now, because if you don't read this whole page, you won't be able to use MadelineProto. - - -``` -git clone https://github.com/danog/MadelineProto -cd MadelineProto -``` - -Now copy .env.example to .env, edit its values, read the docs and take a look at tests/testing.php, bot.php. - -### Dependencies - -To install dependencies install composer and run: -``` -composer update -``` -In the cloned repo. - - ## Contributing [Here](https://github.com/danog/MadelineProto/projects/1) you can find this project's roadmap.