i'm good
This commit is contained in:
parent
3fe1522629
commit
a0ce5c483e
38
README.md
38
README.md
@ -96,7 +96,20 @@ If you're selling a MadelineProto base too, you really should consider donating
|
|||||||
|
|
||||||
### Installation
|
### 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
|
### 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)
|
* \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
|
## Contributing
|
||||||
|
|
||||||
[Here](https://github.com/danog/MadelineProto/projects/1) you can find this project's roadmap.
|
[Here](https://github.com/danog/MadelineProto/projects/1) you can find this project's roadmap.
|
||||||
|
2
bot.php
2
bot.php
@ -34,7 +34,7 @@ echo 'Wrote '.\danog\MadelineProto\Serialization::serialize('bot.madeline', $Mad
|
|||||||
$offset = 0;
|
$offset = 0;
|
||||||
while (true) {
|
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
|
$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) {
|
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
|
$offset = $update['update_id'] + 1; // Just like in the bot API, the offset must be set to the last update_id
|
||||||
switch ($update['update']['_']) {
|
switch ($update['update']['_']) {
|
||||||
|
@ -96,7 +96,20 @@ If you're selling a MadelineProto base too, you really should consider donating
|
|||||||
|
|
||||||
### Installation
|
### 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
|
### 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)
|
* \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
|
## Contributing
|
||||||
|
|
||||||
[Here](https://github.com/danog/MadelineProto/projects/1) you can find this project's roadmap.
|
[Here](https://github.com/danog/MadelineProto/projects/1) you can find this project's roadmap.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user