diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 533e9d3e..d9562cb3 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -93,7 +93,8 @@ class MTProto $this->connect_to_all_dcs(); $this->datacenter->curdc = 2; - if (!isset($this->authorization['bot']) || !$this->authorization['bot']) { + + if (!isset($this->authorization['user']['bot']) || !$this->authorization['user']['bot']) { $nearest_dc = $this->method_call('help.getNearestDc', [], ['datacenter' => $this->datacenter->curdc]); \danog\MadelineProto\Logger::log(["We're in ".$nearest_dc['country'].', current dc is '.$nearest_dc['this_dc'].', nearest dc is '.$nearest_dc['nearest_dc'].'.'], Logger::NOTICE);