Fixes to docs

This commit is contained in:
Daniil Gentili 2018-03-24 13:48:27 +01:00
parent cfe4a038f0
commit f00cd63df8
2 changed files with 10 additions and 7 deletions

View File

@ -62,9 +62,12 @@ $MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => '<
reply_markup accepts bot API reply markup objects as well as MTProto ones. reply_markup accepts bot API reply markup objects as well as MTProto ones.
```php ```php
$bot_API_markup = ['inline_keyboard' => [ $bot_API_markup = ['inline_keyboard' =>
['text' => 'MadelineProto docs', 'url' => 'https://docs.madelineproto.xyz'], [
['text' => 'MadelineProto channel', 'url' => 'https://t.me/MadelineProto'] [
['text' => 'MadelineProto docs', 'url' => 'https://docs.madelineproto.xyz'],
['text' => 'MadelineProto channel', 'url' => 'https://t.me/MadelineProto']
]
] ]
]; ];
$MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => 'lel', 'reply_markup' => $bot_API_markup]); $MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => 'lel', 'reply_markup' => $bot_API_markup]);
@ -98,4 +101,4 @@ $MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => 'l
If the queue if the specified queue name does not exist, it will be created. If the queue if the specified queue name does not exist, it will be created.
<form action="https://docs.madelineproto.xyz/docs/LOGGING.html"><input type="submit" value="Previous section" /></form><form action="https://docs.madelineproto.xyz/docs/FILES.html"><input type="submit" value="Next section" /></form> <form action="https://docs.madelineproto.xyz/docs/LOGGING.html"><input type="submit" value="Previous section" /></form><form action="https://docs.madelineproto.xyz/docs/FILES.html"><input type="submit" value="Next section" /></form>

View File

@ -129,12 +129,12 @@ class Logger
$prefix .= ' (p)'; $prefix .= ' (p)';
} }
if (!is_string($param)) { if (!is_string($param)) {
$parame = json_encode($param, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); $param = json_encode($param, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
if ($parame == '') { /*if ($parame == '') {
$param = var_export($param, true); $param = var_export($param, true);
} else { } else {
$param = $parame; $param = $parame;
} }*/
} }
$param = str_pad(basename(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['file'], '.php').$prefix.': ', 16 + strlen($prefix))."\t".$param; $param = str_pad(basename(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['file'], '.php').$prefix.': ', 16 + strlen($prefix))."\t".$param;
/*if (self::$isatty) { /*if (self::$isatty) {