Wednesday, 26 April 2017

Prompts results.response true

I am working with the Microsoft Bot Framework to build a chatbot. I have written the following line of code:

bot.dialog('/askForNumber', [
  function (session) {
      builder.Prompts.number(session, "Enter a number");
  },
  function (session, results) {
      console.log(results.response);
  }
]);

I am expecting that the number the user entered shows up in the console. However what I am receiving is the value "true". If I write console.log(results) the following object show up in the console:

{ resumed: 0, response: true, childId: 'BotBuilder:Prompts' }

What am I doing wrong?



via Ricardo Woedl

No comments:

Post a Comment