@@ 805-809 (lines=5) @@ | ||
802 | ||
803 | $result = Request::setWebhook($url, $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 | } |
|
@@ 837-841 (lines=5) @@ | ||
834 | { |
|
835 | $result = Request::deleteWebhook(); |
|
836 | ||
837 | if (!$result->isOk()) { |
|
838 | throw new TelegramException( |
|
839 | 'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
840 | ); |
|
841 | } |
|
842 | ||
843 | return $result; |
|
844 | } |