| @@ 758-762 (lines=5) @@ | ||
| 755 | ||
| 756 | $result = Request::setWebhook($url, $data); |
|
| 757 | ||
| 758 | if (!$result->isOk()) { |
|
| 759 | throw new TelegramException( |
|
| 760 | 'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 761 | ); |
|
| 762 | } |
|
| 763 | ||
| 764 | return $result; |
|
| 765 | } |
|
| @@ 790-794 (lines=5) @@ | ||
| 787 | { |
|
| 788 | $result = Request::deleteWebhook(); |
|
| 789 | ||
| 790 | if (!$result->isOk()) { |
|
| 791 | throw new TelegramException( |
|
| 792 | 'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 793 | ); |
|
| 794 | } |
|
| 795 | ||
| 796 | return $result; |
|
| 797 | } |
|