@@ 891-895 (lines=5) @@ | ||
888 | ||
889 | $result = Request::setWebhook($data); |
|
890 | ||
891 | if (!$result->isOk()) { |
|
892 | throw new TelegramException( |
|
893 | 'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
894 | ); |
|
895 | } |
|
896 | ||
897 | return $result; |
|
898 | } |
|
@@ 910-914 (lines=5) @@ | ||
907 | { |
|
908 | $result = Request::deleteWebhook(); |
|
909 | ||
910 | if (!$result->isOk()) { |
|
911 | throw new TelegramException( |
|
912 | 'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
913 | ); |
|
914 | } |
|
915 | ||
916 | return $result; |
|
917 | } |