| @@ 868-872 (lines=5) @@ | ||
| 865 | ||
| 866 | $result = Client::setWebhook($data); |
|
| 867 | ||
| 868 | if (! $result->isOk()) { |
|
| 869 | throw new TelegramException( |
|
| 870 | 'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 871 | ); |
|
| 872 | } |
|
| 873 | ||
| 874 | return $result; |
|
| 875 | } |
|
| @@ 887-891 (lines=5) @@ | ||
| 884 | { |
|
| 885 | $result = Client::deleteWebhook(); |
|
| 886 | ||
| 887 | if (! $result->isOk()) { |
|
| 888 | throw new TelegramException( |
|
| 889 | 'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 890 | ); |
|
| 891 | } |
|
| 892 | ||
| 893 | return $result; |
|
| 894 | } |
|