| @@ 845-849 (lines=5) @@ | ||
| 842 | ||
| 843 | $result = Request::setWebhook($data); |
|
| 844 | ||
| 845 | if (!$result->isOk()) { |
|
| 846 | throw new TelegramException( |
|
| 847 | 'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 848 | ); |
|
| 849 | } |
|
| 850 | ||
| 851 | return $result; |
|
| 852 | } |
|
| @@ 864-868 (lines=5) @@ | ||
| 861 | { |
|
| 862 | $result = Request::deleteWebhook(); |
|
| 863 | ||
| 864 | if (!$result->isOk()) { |
|
| 865 | throw new TelegramException( |
|
| 866 | 'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 867 | ); |
|
| 868 | } |
|
| 869 | ||
| 870 | return $result; |
|
| 871 | } |
|