@@ 804-808 (lines=5) @@ | ||
801 | ||
802 | $result = Request::setWebhook($url, $data); |
|
803 | ||
804 | if (!$result->isOk()) { |
|
805 | throw new TelegramException( |
|
806 | 'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
807 | ); |
|
808 | } |
|
809 | ||
810 | return $result; |
|
811 | } |
|
@@ 836-840 (lines=5) @@ | ||
833 | { |
|
834 | $result = Request::deleteWebhook(); |
|
835 | ||
836 | if (!$result->isOk()) { |
|
837 | throw new TelegramException( |
|
838 | 'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
839 | ); |
|
840 | } |
|
841 | ||
842 | return $result; |
|
843 | } |