-
-
Notifications
You must be signed in to change notification settings - Fork 190
/
config.example.php
92 lines (81 loc) · 3.18 KB
/
config.example.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
/**
* This file is part of the PHP Telegram Bot example-bot package.
* https://github.com/php-telegram-bot/example-bot/
*
* (c) PHP Telegram Bot Team
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* This file contains all the configuration options for the PHP Telegram Bot.
*
* It is based on the configuration array of the PHP Telegram Bot Manager project.
*
* Simply adjust all the values that you need and extend where necessary.
*
* Options marked as [Manager Only] are only required if you use `manager.php`.
*
* For a full list of all options, check the Manager Readme:
* https://github.com/php-telegram-bot/telegram-bot-manager#set-extra-bot-parameters
*/
return [
// Add you bot's API key and name
'api_key' => 'your:bot_api_key',
'bot_username' => 'username_bot', // Without "@"
// [Manager Only] Secret key required to access the webhook
'secret' => 'super_secret',
// When using the getUpdates method, this can be commented out
'webhook' => [
'url' => 'https://your-domain/path/to/hook-or-manager.php',
// Use self-signed certificate
// 'certificate' => __DIR__ . '/path/to/your/certificate.crt',
// Limit maximum number of connections
// 'max_connections' => 5,
],
// All command related configs go here
'commands' => [
// Define all paths for your custom commands
// DO NOT PUT THE COMMAND FOLDER THERE. IT WILL NOT WORK.
// Copy each needed Commandfile into the CustomCommand folder and uncommend the Line 49 below
'paths' => [
// __DIR__ . '/CustomCommands',
],
// Here you can set any command-specific parameters
'configs' => [
// - Google geocode/timezone API key for /date command (see DateCommand.php)
// 'date' => ['google_api_key' => 'your_google_api_key_here'],
// - OpenWeatherMap.org API key for /weather command (see WeatherCommand.php)
// 'weather' => ['owm_api_key' => 'your_owm_api_key_here'],
// - Payment Provider Token for /payment command (see Payments/PaymentCommand.php)
// 'payment' => ['payment_provider_token' => 'your_payment_provider_token_here'],
],
],
// Define all IDs of admin users
'admins' => [
// 123,
],
// Enter your MySQL database credentials
// 'mysql' => [
// 'host' => '127.0.0.1',
// 'user' => 'root',
// 'password' => 'root',
// 'database' => 'telegram_bot',
// ],
// Logging (Debug, Error and Raw Updates)
// 'logging' => [
// 'debug' => __DIR__ . '/php-telegram-bot-debug.log',
// 'error' => __DIR__ . '/php-telegram-bot-error.log',
// 'update' => __DIR__ . '/php-telegram-bot-update.log',
// ],
// Set custom Upload and Download paths
'paths' => [
'download' => __DIR__ . '/Download',
'upload' => __DIR__ . '/Upload',
],
// Requests Limiter (tries to prevent reaching Telegram API limits)
'limiter' => [
'enabled' => true,
],
];