mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 10:38:59 +01:00
parent
c2ce149436
commit
5dd54b9590
8
bot.php
8
bot.php
@ -13,17 +13,17 @@ If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
$settings = [];
|
||||
|
||||
// $token="Uncomment and put your Token here";
|
||||
try {
|
||||
$MadelineProto = \danog\MadelineProto\Serialization::deserialize('bot.madeline');
|
||||
} catch (\danog\MadelineProto\Exception $e) {
|
||||
if (file_exists('token.php')) {
|
||||
include_once 'token.php';
|
||||
if (isset($token)) {
|
||||
|
||||
$MadelineProto = new \danog\MadelineProto\API($settings);
|
||||
$authorization = $MadelineProto->bot_login($token);
|
||||
\danog\MadelineProto\Logger::log([$authorization], \danog\MadelineProto\Logger::NOTICE);
|
||||
} else {
|
||||
echo 'token.php does not exist';
|
||||
echo 'token does not exist';
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user