Source code for pi_portal.modules.integrations.chat.cli.commands.command_restart

"""Chat CLI Restart command."""

from .bases.command import ChatCommandBase


[docs]class RestartCommand(ChatCommandBase): """Chat CLI command to restart the Bot process."""
[docs] def invoke(self) -> None: """Restart the chat CLI bot.""" self.chatbot.task_scheduler_client.chat_send_message("Rebooting myself ...") self.chatbot.halt()