Updated method \TgBotLib > Bot > handleGetUpdates()
to handle exceptions
This commit is contained in:
parent
8a4dfddae6
commit
fbc472d8de
6 changed files with 21 additions and 27 deletions
|
@ -18,9 +18,9 @@
|
|||
public function handle(Bot $bot, Update $update): void
|
||||
{
|
||||
// Usage: /hash <text>
|
||||
$data = str_replace('/hash ', '', $update->getMessage()->getText());
|
||||
$data = str_replace('/hash ', '', $update->getMessage()?->getText());
|
||||
$bot->sendMessage(
|
||||
$update->getMessage()->getChat()->getId(), md5($data)
|
||||
$update->getMessage()?->getChat()?->getId(), md5($data)
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue