code: function guessnumber(request, response) {
    if (request.body.result) {
  
      dashbot.logIncoming(request.body)
  
      var action = request.body.result.action;
  
      // Handle a request where the action is "generate_answer"
      if (action == "generate_answer") {
        var answer = getRandomNumber(1,100);
        let msg = {
          speech: "I’m thinking of a number from 0 to 100. What’s your first guess?",
          data: { google: { expect_user_response: true } },
          contextOut: [
            {
              name:"game",
              lifespan:100,
              parameters:{
                answer:answer
              }
            }
          ]
        }
        dashbot.logOutgoing(request.body, msg)
        response.send(msg);
  
      // Handle a request where the action is "check_guess"
      } else if (action == "check_guess") {
        var answer = parseInt(request.body.result.contexts[0].parameters.answer);
        var guess = parseInt(request.body.result.parameters.guess);
        var tts = "Congratulations, that’s it! I was thinking of " + answer;
        var closeMic = false;
        if (answer > guess) tts = "It's higher than " + guess + ". What's your next guess?";
        else if (answer < guess) tts = "It's lower than " + guess + ". Next guess?";
        else closeMic = true;
  
        let msg = {
          speech: tts,
          data: { google: { expect_user_response: !closeMic }}
        }
        dashbot.logOutgoing(request.body, msg)
        response.send(msg);
      }
      return;
    }
  }
docs: Handle requests from the agent