Update bot.php
This commit is contained in:
parent
17e85d361c
commit
68ab47de32
@ -82,17 +82,9 @@ class MyEventHandler extends EventHandler
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$res = \json_encode($update, JSON_PRETTY_PRINT);
|
$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']);
|
||||||
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') {
|
||||||
if (isset($update['message']['media']) && $update['message']['media']['_'] !== 'messageMediaGame') {
|
yield $this->messages->sendMedia(['peer' => $update, 'message' => $update['message']['message'], 'media' => $update]);
|
||||||
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");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user