(self, request: CommandCreate)
return self._state_store.commands.get(command.id)
Add a command to the queue and wait for it to complete.

        The engine must be started by calling `play` before the command will
        execute. You only need to call `play` once.

        Arguments:
            request: The command type and payload data used to construct
                the command in state.

        Returns:
            The completed command, whether it succeeded or failed.
Add a command to the queue and wait for it to complete.
Add a command to the queue and wait for it to complete .
async def add_and_execute_command(self, request: CommandCreate) -> Command:
        """Add a command to the queue and wait for it to complete.

        The engine must be started by calling `play` before the command will
        execute. You only need to call `play` once.

        Arguments:
            request: The command type and payload data used to construct
                the command in state.

        Returns:
            The completed command, whether it succeeded or failed.
        """
        command = self.add_command(request)
        await self._state_store.wait_for(
            condition=self._state_store.commands.get_is_complete,
            command_id=command.id,
        )
        return self._state_store.commands.get(command.id)
async def add_and_execute_command ( self , request : CommandCreate ) -> Command : command = self . add_command ( request ) await self . _state_store . wait_for ( condition = self . _state_store . commands . get_is_complete , command_id = command . id , ) return self . _state_store . commands . get ( command . id )