setName('educai:talk:bot:sync') ->setDescription('Register or repair the NuQloud-AI Talk bot'); parent::configure(); } protected function execute(InputInterface $input, OutputInterface $output): int { $result = $this->talkBotRegistrationService->syncRegistration(null, true, true); $status = (string)($result['status'] ?? 'error'); $message = trim((string)($result['message'] ?? 'NuQloud-AI Talk bot synchronization did not return a result.')); if ($status === 'error') { $output->writeln('' . $message . ''); return 1; } $output->writeln($message); return 0; } }