mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 22:34:42 +01:00
Apply fixes from StyleCI
This commit is contained in:
parent
08a3a00c13
commit
30e87023d9
14
bot.php
14
bot.php
@ -15,14 +15,14 @@ require 'vendor/autoload.php';
|
||||
$settings = [];
|
||||
|
||||
try {
|
||||
$MadelineProto = \danog\MadelineProto\Serialization::deserialize('bot.madeline');
|
||||
$MadelineProto = \danog\MadelineProto\Serialization::deserialize('bot.madeline');
|
||||
} catch (\danog\MadelineProto\Exception $e) {
|
||||
if (file_exists('token.php')) {
|
||||
include_once 'token.php';
|
||||
$MadelineProto = new \danog\MadelineProto\API($settings);
|
||||
$authorization = $MadelineProto->bot_login($token);
|
||||
\danog\MadelineProto\Logger::log([$authorization], \danog\MadelineProto\Logger::NOTICE);
|
||||
}
|
||||
if (file_exists('token.php')) {
|
||||
include_once 'token.php';
|
||||
$MadelineProto = new \danog\MadelineProto\API($settings);
|
||||
$authorization = $MadelineProto->bot_login($token);
|
||||
\danog\MadelineProto\Logger::log([$authorization], \danog\MadelineProto\Logger::NOTICE);
|
||||
}
|
||||
}
|
||||
$offset = 0;
|
||||
while (true) {
|
||||
|
@ -51,7 +51,12 @@ class API extends APIFactory
|
||||
|
||||
return ['API', 'v'];
|
||||
}
|
||||
public function getV() { return 1; }
|
||||
|
||||
public function getV()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function __wakeup()
|
||||
{
|
||||
set_error_handler(['\danog\MadelineProto\Exception', 'ExceptionErrorHandler']);
|
||||
|
Loading…
Reference in New Issue
Block a user