From b7fbb999b6305c5c611a10283edcc64f8fe58c06 Mon Sep 17 00:00:00 2001 From: Roozbeh Baabakaan Date: Tue, 22 Sep 2015 13:15:18 +0330 Subject: [PATCH 1/3] check array key by isset check array key by isset --- src/BotApi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BotApi.php b/src/BotApi.php index 5e871def..3f9a9f3a 100644 --- a/src/BotApi.php +++ b/src/BotApi.php @@ -182,7 +182,7 @@ public function call($method, array $data = null) $response = $this->executeCurl($options); if ($this->returnArray) { - if (!$response['ok']) { + if (!isset($response['ok'])) { throw new Exception($response['description'], $response['error_code']); } From d4fe139d75f35abcfd4feaa9a62b045d19fde704 Mon Sep 17 00:00:00 2001 From: Ilya Gusev Date: Tue, 22 Sep 2015 14:03:19 +0300 Subject: [PATCH 2/3] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 68914799..9419d29e 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,12 @@ An extended native php wrapper for [Telegram Bot API](https://core.telegram.org/bots/api) without requirements. Supports all methods and types of responses. +## Bots: An introduction for developers +>Bots are special Telegram accounts designed to handle messages automatically. Users can interact with bots by sending them command messages in private or group chats. You control your bots using HTTPS requests to [bot API](https://core.telegram.org/bots/api). + +>The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. +To learn how to create and set up a bot, please consult [Introduction to Bots](https://core.telegram.org/bots) and [Bot FAQ](https://core.telegram.org/bots/faq). + ## Install Via Composer From 1c98a162593af0e53eedf815eb7c1c4a73e82750 Mon Sep 17 00:00:00 2001 From: Ilya Gusev Date: Tue, 22 Sep 2015 14:03:53 +0300 Subject: [PATCH 3/3] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9419d29e..58064203 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ An extended native php wrapper for [Telegram Bot API](https://core.telegram.org/bots/api) without requirements. Supports all methods and types of responses. ## Bots: An introduction for developers ->Bots are special Telegram accounts designed to handle messages automatically. Users can interact with bots by sending them command messages in private or group chats. You control your bots using HTTPS requests to [bot API](https://core.telegram.org/bots/api). +>Bots are special Telegram accounts designed to handle messages automatically. Users can interact with bots by sending them command messages in private or group chats. + +>You control your bots using HTTPS requests to [bot API](https://core.telegram.org/bots/api). >The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. To learn how to create and set up a bot, please consult [Introduction to Bots](https://core.telegram.org/bots) and [Bot FAQ](https://core.telegram.org/bots/faq).