| @@ 834-838 (lines=5) @@ | ||
| 831 | ||
| 832 | $result = Request::setWebhook($data); |
|
| 833 | ||
| 834 | if (!$result->isOk()) { |
|
| 835 | throw new TelegramException( |
|
| 836 | 'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 837 | ); |
|
| 838 | } |
|
| 839 | ||
| 840 | return $result; |
|
| 841 | } |
|
| @@ 853-857 (lines=5) @@ | ||
| 850 | { |
|
| 851 | $result = Request::deleteWebhook(); |
|
| 852 | ||
| 853 | if (!$result->isOk()) { |
|
| 854 | throw new TelegramException( |
|
| 855 | 'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 856 | ); |
|
| 857 | } |
|
| 858 | ||
| 859 | return $result; |
|
| 860 | } |
|