| @@ 816-820 (lines=5) @@ | ||
| 813 | ||
| 814 | $result = Client::setWebhook($data); |
|
| 815 | ||
| 816 | if (! $result->isOk()) { |
|
| 817 | throw new TelegramException( |
|
| 818 | 'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 819 | ); |
|
| 820 | } |
|
| 821 | ||
| 822 | return $result; |
|
| 823 | } |
|
| @@ 835-839 (lines=5) @@ | ||
| 832 | { |
|
| 833 | $result = Client::deleteWebhook(); |
|
| 834 | ||
| 835 | if (! $result->isOk()) { |
|
| 836 | throw new TelegramException( |
|
| 837 | 'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 838 | ); |
|
| 839 | } |
|
| 840 | ||
| 841 | return $result; |
|
| 842 | } |
|