Exiting in middle of a skill


#1

Is there a way to exit my skill if for example I ask the user something and he doesn’t want to continue with the skill?
Thank You


#2

you say hey mycroft Stop. can you describe your problem more exactly? that it becomes understandable


#3

Assuming you are programming your own skill a return True should do the trick.


#4

In the handle of my skill I want to ask the user a question and if his answer is invalid I want to exit.
Where do I return true (just from the intent handler)?


#5

Yeah that would work, something like:

def handle_hello_world_intent(self, message):
    test = self.get_response('question')
    if test not in valid_responses:
        self.speak_dialog('not.valid.response')
        return True
    else_do_something_else()