Update bot.php
This commit is contained in:
parent
17e85d361c
commit
68ab47de32
@ -82,18 +82,10 @@ class MyEventHandler extends EventHandler
|
||||
return;
|
||||
}
|
||||
$res = \json_encode($update, JSON_PRETTY_PRINT);
|
||||
try {
|
||||
yield $this->messages->sendMessage(['peer' => $update, 'message' => "<code>$res</code>", 'reply_to_msg_id' => isset($update['message']['id']) ? $update['message']['id'] : null, 'parse_mode' => 'HTML']);
|
||||
if (isset($update['message']['media']) && $update['message']['media']['_'] !== 'messageMediaGame') {
|
||||
yield $this->messages->sendMedia(['peer' => $update, 'message' => $update['message']['message'], 'media' => $update]);
|
||||
}
|
||||
} catch (RPCErrorException $e) {
|
||||
$this->report("Surfaced: $e");
|
||||
} catch (Exception $e) {
|
||||
if (\stripos($e->getMessage(), 'invalid constructor given') === false) {
|
||||
$this->report("Surfaced: $e");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$settings = [
|
||||
|
Loading…
Reference in New Issue
Block a user