YaKotikTvoy

config.php

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