Fix examples
This commit is contained in:
parent
757d12fbdd
commit
76640a01ad
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user