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';
|
require 'vendor/autoload.php';
|
||||||
$settings = [];
|
$settings = [];
|
||||||
|
// $token="Uncomment and put your Token here";
|
||||||
try {
|
try {
|
||||||
$MadelineProto = \danog\MadelineProto\Serialization::deserialize('bot.madeline');
|
$MadelineProto = \danog\MadelineProto\Serialization::deserialize('bot.madeline');
|
||||||
} catch (\danog\MadelineProto\Exception $e) {
|
} catch (\danog\MadelineProto\Exception $e) {
|
||||||
if (file_exists('token.php')) {
|
if (isset($token)) {
|
||||||
include_once 'token.php';
|
|
||||||
$MadelineProto = new \danog\MadelineProto\API($settings);
|
$MadelineProto = new \danog\MadelineProto\API($settings);
|
||||||
$authorization = $MadelineProto->bot_login($token);
|
$authorization = $MadelineProto->bot_login($token);
|
||||||
\danog\MadelineProto\Logger::log([$authorization], \danog\MadelineProto\Logger::NOTICE);
|
\danog\MadelineProto\Logger::log([$authorization], \danog\MadelineProto\Logger::NOTICE);
|
||||||
} else {
|
} else {
|
||||||
echo 'token.php does not exist';
|
echo 'token does not exist';
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user