You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
3.2 KiB

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