Example #1
0
 def handle(self, handler_input):
     logger.debug("Handling DropIntent")
     slots = handler_input.request_envelope.request.intent.slots
     handler_input.attributes_manager.session_attributes["command"] = "drop {item}".format(
         item=slots["item"].value
     )
     loop = asyncio.get_event_loop()
     loop.run_until_complete(SetupWebSocket(handler_input))
     return handler_input.response_builder.response
Example #2
0
 def handle(self, handler_input):
     logger.debug("Handling CharUpdate Intent")
     slots = handler_input.request_envelope.request.intent.slots
     handler_input.attributes_manager.session_attributes[
         "command"
     ] = "charupdate {rating}".format(rating=slots["numerical_rating"].value)
     loop = asyncio.get_event_loop()
     loop.run_until_complete(SetupWebSocket(handler_input))
     return handler_input.response_builder.response
Example #3
0
 def handle(self, handler_input):
     slots = handler_input.request_envelope.request.intent.slots
     handler_input.attributes_manager.session_attributes["command"] = "look {object}".format(
         object=slots["object"].value or ""
     )
     logger.debug("Handling Look Intent")
     loop = asyncio.get_event_loop()
     loop.run_until_complete(SetupWebSocket(handler_input))
     return handler_input.response_builder.response
Example #4
0
 def handle(self, handler_input):
     slots = handler_input.request_envelope.request.intent.slots
     handler_input.attributes_manager.session_attributes["command"] = "move {direction}".format(
         direction=slots["direction"].value
     )
     logger.debug("Handling Move Intent")
     loop = asyncio.get_event_loop()
     loop.run_until_complete(SetupWebSocket(handler_input))
     return handler_input.response_builder.response
Example #5
0
    def handle(self, handler_input):
        """

        Handles the launch of the skill. Since no 'command' is in session_attributes,
        this will follow the websocket_protocol default for what happens when a command
        isn't available ('look')

        Args:
            handler_input: HandlerInput Object

        Returns:
            Response
        """
        logger.debug("Handling Launch Request")
        loop = asyncio.get_event_loop()
        loop.run_until_complete(SetupWebSocket(handler_input))
        return handler_input.response_builder.response
Example #6
0
 def handle(self, handler_input):
     logger.debug("Handling CheckInventoryIntent")
     handler_input.attributes_manager.session_attributes["command"] = "inventory"
     loop = asyncio.get_event_loop()
     loop.run_until_complete(SetupWebSocket(handler_input))
     return handler_input.response_builder.response