src/Core/Server.php
private function tryLogin(): bool
    {
        if (is_file($this->vbot->config['cookie_file']) && $this->vbot->cache->has($this->vbot->config['session_key'])) {
            $configs = json_decode($this->vbot->cache->get($this->vbot->config['session_key']), true);

            $this->vbot->config['server'] = $configs;
            $this->vbot->config['server.time'] = $this->vbot->config['server.time'] ?: Carbon::now()->toDateTimeString();

            if (!($checkSync = $this->vbot->sync->checkSync())) {
                return false;
            }

            $result = $this->vbot->messageHandler->handleCheckSync($checkSync[0], $checkSync[1], true);

            if ($result) {
                $this->vbot->reLoginSuccessObserver->trigger();

                return true;
            }
        }
        $this->vbot->config['server.time'] = Carbon::now()->toDateTimeString();

        return false;
    }
private function tryLogin(): bool
    {
        if (is_file($this->vbot->config['cookie_file']) && $this->vbot->cache->has($this->vbot->config['session_key'])) {
            $configs = json_decode($this->vbot->cache->get($this->vbot->config['session_key']), true);

            $this->vbot->config['server'] = $configs;
            $this->vbot->config['server.time'] = $this->vbot->config['server.time'] ?: Carbon::now()->toDateTimeString();

            if (!($checkSync = $this->vbot->sync->checkSync())) {
                return false;
            }

            $result = $this->vbot->messageHandler->handleCheckSync($checkSync[0], $checkSync[1], true);

            if ($result) {
                $this->vbot->reLoginSuccessObserver->trigger();

                return true;
            }
        }
        $this->vbot->config['server.time'] = Carbon::now()->toDateTimeString();

        return false;
    }
尝试登录.

@return bool