Skip to content

Commit 165d88f

Browse files
committed
Fixes
1 parent d756b2d commit 165d88f

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Contributing
22
-------------
33

4-
Before you contribute code to php-telegram-bot, please make sure it conforms to the PHPCS coding standard and that the php-telegram-bot unit tests still pass. The easiest way to contribute is to work on a checkout of the repository, or your own fork, rather than an installed PEAR version. If you do this, you can run the following commands to check if everything is ready to submit:
4+
Before you contribute code to php-telegram-bot, please make sure it conforms to the PSR-2 coding standard and that the php-telegram-bot unit tests still pass. The easiest way to contribute is to work on a checkout of the repository, or your own fork. If you do this, you can run the following commands to check if everything is ready to submit:
55

66
cd php-telegram-bot
77
composer update

README.md

+15-17
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[![Join the chat at https://gitter.im/akalongman/php-telegram-bot](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/akalongman/php-telegram-bot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
55

6-
[![Build Status](https://travis-ci.org/akalongman/php-telegram-bot.svg?branch=master)](https://travis-ci.org/akalongman/kautilities)
6+
[![Build Status](https://travis-ci.org/akalongman/php-telegram-bot.svg?branch=master)](https://travis-ci.org/akalongman/php-telegram-bot)
77
[![Latest Stable Version](https://img.shields.io/packagist/v/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot)
88
[![Total Downloads](https://img.shields.io/packagist/dt/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot)
99
[![Downloads Month](https://img.shields.io/packagist/dm/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot)
@@ -106,14 +106,13 @@ $API_KEY = 'your_bot_api_key';
106106
$BOT_NAME = 'namebot';
107107

108108
try {
109-
// create Telegram API object
110-
$telegram = new Longman\TelegramBot\Telegram($API_KEY, $BOT_NAME);
109+
// create Telegram API object
110+
$telegram = new Longman\TelegramBot\Telegram($API_KEY, $BOT_NAME);
111111

112-
// set webhook
113-
echo $telegram->setWebHook('https://yourdomain/yourpath_to_hook.php');
114-
}
115-
catch (Longman\TelegramBot\Exception\TelegramException $e) {
116-
echo $e->getMessage();
112+
// set webhook
113+
echo $telegram->setWebHook('https://yourdomain/yourpath_to_hook.php');
114+
} catch (Longman\TelegramBot\Exception\TelegramException $e) {
115+
echo $e->getMessage();
117116
}
118117
```
119118
And open your set.php via browser
@@ -129,15 +128,14 @@ $API_KEY = 'your_bot_api_key';
129128
$BOT_NAME = 'namebot';
130129

131130
try {
132-
// create Telegram API object
133-
$telegram = new Longman\TelegramBot\Telegram($API_KEY,$BOT_NAME);
134-
135-
// handle telegram webhook request
136-
$telegram->handle();
137-
}
138-
catch (Longman\TelegramBot\Exception\TelegramException $e) {
139-
// log telegram errors
140-
// echo $e->getMessage();
131+
// create Telegram API object
132+
$telegram = new Longman\TelegramBot\Telegram($API_KEY,$BOT_NAME);
133+
134+
// handle telegram webhook request
135+
$telegram->handle();
136+
} catch (Longman\TelegramBot\Exception\TelegramException $e) {
137+
// log telegram errors
138+
// echo $e->getMessage();
141139
}
142140
```
143141

0 commit comments

Comments
 (0)