Skip to content

Commit 6ca2efa

Browse files
committed
Update readme to reflect latest PR, loosening requirements.
1 parent 5e3e86a commit 6ca2efa

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ try {
129129
$bot = new BotManager([
130130
// Vitals!
131131
'api_key' => '12345:my_api_key',
132-
'bot_username' => 'my_own_bot',
133-
'secret' => 'super_secret',
134132

135133
// Extras.
134+
'bot_username' => 'my_own_bot',
135+
'secret' => 'super_secret',
136136
'webhook' => [
137137
'url' => 'https://example.com/manager.php',
138138
]
@@ -145,22 +145,25 @@ try {
145145

146146
### Set vital bot parameters
147147

148-
The vital parameters are:
148+
The only vital parameters is the API key:
149149

150150
```php
151151
$bot = new BotManager([
152152
// (string) Bot API key provided by @BotFather.
153-
'api_key' => '12345:my_api_key',
154-
// (string) Bot username that was defined when creating the bot.
155-
'bot_username' => 'my_own_bot',
156-
// (string) A secret password required to authorise access to the webhook.
157-
'secret' => 'super_secret',
158-
153+
'api_key' => '12345:my_api_key',
159154
...
160155
]);
161156
```
162157

163-
The `secret` is a user-defined key that is required to execute any of the library's features.
158+
### Set extra bot parameters
159+
160+
Apart from the necessary API key, the bot can be easily configured using extra parameters.
161+
162+
Set the webhook? Enable admins? Add custom command paths? Set up logging?
163+
164+
**All no problem!**
165+
166+
The `secret` is a user-defined key that is required to execute any of the library's features via webhook.
164167
Best make it long, random and very unique!
165168

166169
For 84 random characters:
@@ -169,19 +172,16 @@ For 84 random characters:
169172

170173
(You get 2 guesses why 84 is a good number :wink:)
171174

172-
### Set extra bot parameters
173-
174-
Apart from the necessary vital parameters, the bot can be easily configured using extra parameters.
175-
176-
Enable admins? Add custom command paths? Set up logging?
177-
178-
**All no problem!**
179-
180-
Here is a complete list of all available extra parameters:
175+
Below is a complete list of all available extra parameters.
181176

182177
```php
183178
$bot = new BotManager([
184179
...
180+
// (string) Bot username that was defined when creating the bot.
181+
'bot_username' => 'my_own_bot',
182+
183+
// (string) A secret password required to authorise access to the webhook.
184+
'secret' => 'super_secret',
185185

186186
// (array) All options that have to do with the webhook.
187187
'webhook' => [

0 commit comments

Comments
 (0)