| @@ 824-828 (lines=5) @@ | ||
| 821 | { |
|
| 822 | $result = Request::deleteWebhook(); |
|
| 823 | ||
| 824 | if (!$result->isOk()) { |
|
| 825 | throw new TelegramException( |
|
| 826 | 'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 827 | ); |
|
| 828 | } |
|
| 829 | ||
| 830 | return $result; |
|
| 831 | } |
|
| @@ 805-809 (lines=5) @@ | ||
| 802 | ||
| 803 | $result = Request::setWebhook($data); |
|
| 804 | ||
| 805 | if (!$result->isOk()) { |
|
| 806 | throw new TelegramException( |
|
| 807 | 'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 808 | ); |
|
| 809 | } |
|
| 810 | ||
| 811 | return $result; |
|
| 812 | } |
|