Merge branch 'master' of github.com:danog/MadelineProtoDocs

This commit is contained in:
Daniil Gentili 2019-12-29 14:39:21 +01:00
commit 087d105504
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
3 changed files with 10 additions and 10 deletions

View File

@ -48,7 +48,7 @@ composer.json:
"description": "Project description",
"type": "project",
"require": {
"danog/madelineproto": "^5.0",
"danog/madelineproto": "^5.0"
},
"minimum-stability": "dev",
"license": "AGPL-3.0-only",
@ -91,4 +91,4 @@ Then you can require the package:
composer require danog/madelineproto
```
<a href="https://docs.madelineproto.xyz/docs/UPDATES.html">Next section</a>
<a href="https://docs.madelineproto.xyz/docs/UPDATES.html">Next section</a>

View File

@ -13,9 +13,9 @@ To install MadelineProto dependencies on `Ubuntu`, `Debian`, `Devuan`, or any ot
sudo apt-get install python-software-properties software-properties-common
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.3 php7.3-dev php7.3-fpm php7.3-xml php7.3-zip php7.3-gmp php7.3-cli php7.3-mbstring php7.3-json git -y
sudo apt-get install php7.4 php7.4-dev php7.4-fpm php7.4-xml php7.4-zip php7.4-gmp php7.4-cli php7.4-mbstring php7.4-json git -y
```
Next, follow the instructions on [voip.madelineproto.xyz](https://voip.madelineproto.xyz) and [prime.madelineproto.xyz](https://prime.madelineproto.xyz) to install libtgvoip and PrimeModule.
<a href="https://docs.madelineproto.xyz/docs/INSTALLATION.html">Next section</a>
<a href="https://docs.madelineproto.xyz/docs/INSTALLATION.html">Next section</a>

View File

@ -77,7 +77,7 @@ class EventHandler extends \danog\MadelineProto\EventHandler
try {
yield $this->messages->sendMessage(['peer' => $update, 'message' => $res, 'reply_to_msg_id' => $update['message']['id']]);
} catch (\danog\MadelineProto\RPCErrorException $e) {
yield $this->messages->sendMessage(['peer' => '@danogentili', 'message' => $e]);
yield $this->messages->sendMessage(['peer' => '@danogentili', 'message' => (string) $e]);
}
try {
@ -87,7 +87,7 @@ class EventHandler extends \danog\MadelineProto\EventHandler
yield $this->messages->sendMessage(['peer' => $update, 'message' => 'Downloaded to '.$file.' in '.(microtime(true) - $time).' seconds', 'reply_to_msg_id' => $update['message']['id']]);
}
} catch (\danog\MadelineProto\RPCErrorException $e) {
yield $this->messages->sendMessage(['peer' => '@danogentili', 'message' => $e]);
yield $this->messages->sendMessage(['peer' => '@danogentili', 'message' => (string) $e]);
}
}
}
@ -159,7 +159,7 @@ class EventHandler extends \danog\MadelineProto\CombinedEventHandler
try {
yield $this->{$session}->messages->sendMessage(['peer' => $update, 'message' => $res, 'reply_to_msg_id' => $update['message']['id']]);
} catch (\danog\MadelineProto\RPCErrorException $e) {
yield $this->{$session}->messages->sendMessage(['peer' => '@danogentili', 'message' => $e]);
yield $this->{$session}->messages->sendMessage(['peer' => '@danogentili', 'message' => (string) $e]);
}
try {
@ -169,7 +169,7 @@ class EventHandler extends \danog\MadelineProto\CombinedEventHandler
yield $this->{$session}->messages->sendMessage(['peer' => $update, 'message' => 'Downloaded to '.$file.' in '.(microtime(true) - $time).' seconds', 'reply_to_msg_id' => $update['message']['id']]);
}
} catch (\danog\MadelineProto\RPCErrorException $e) {
yield $this->{$session}->messages->sendMessage(['peer' => '@danogentili', 'message' => $e]);
yield $this->{$session}->messages->sendMessage(['peer' => '@danogentili', 'message' => (string) $e]);
}
}
}
@ -246,7 +246,7 @@ $MadelineProto->setCallback(function ($update) use ($MadelineProto) {
try {
yield $MadelineProto->messages->sendMessage(['peer' => $update, 'message' => $res, 'reply_to_msg_id' => $update['message']['id']]);
} catch (\danog\MadelineProto\RPCErrorException $e) {
yield $MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => $e]);
yield $MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => (string) $e]);
}
});
$MadelineProto->async(true);
@ -284,4 +284,4 @@ You can use the `resetUpdateState` method to reset the update state and fetch al
$MadelineProto->resetUpdateState();
```
<a href="https://docs.madelineproto.xyz/docs/SETTINGS.html">Next section</a>
<a href="https://docs.madelineproto.xyz/docs/SETTINGS.html">Next section</a>