Skip to content

Commit

Permalink
Merge pull request php-telegram-bot#7 from noplanman/fix_logfile_names
Browse files Browse the repository at this point in the history
Define bot_username as a variable to reuse for logfile names.
  • Loading branch information
noplanman committed Aug 16, 2017
2 parents 4c64c25 + df007d3 commit dfde871
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
// Load composer
require_once __DIR__ . '/vendor/autoload.php';

// Add you bot's username (also to be used for log file names)
$bot_username = 'username_bot'; // Without "@"

try {
$bot = new TelegramBot\TelegramBotManager\BotManager([
// Add you bot's API key and name
'api_key' => 'your:bot_api_key',
'bot_username' => 'username_bot',
'bot_username' => $bot_username,

// Secret key required to access the webhook
'secret' => 'super_secret',
Expand Down Expand Up @@ -56,9 +59,9 @@

// Logging (Error, Debug and Raw Updates)
//'logging' => [
// 'debug' => __DIR__ . '/{$bot_username}_debug.log',
// 'error' => __DIR__ . '/{$bot_username}_error.log',
// 'update' => __DIR__ . '/{$bot_username}_update.log',
// 'debug' => __DIR__ . "/{$bot_username}_debug.log",
// 'error' => __DIR__ . "/{$bot_username}_error.log",
// 'update' => __DIR__ . "/{$bot_username}_update.log",
//],

// Set custom Upload and Download paths
Expand Down

0 comments on commit dfde871

Please sign in to comment.