简体   繁体   中英

Botframework loop user first bot wait for message

If user complete conversation, bot wait for user input. But I dont want wait.

This happen

  1. Bot: Tell me a good joke
  2. user: Can a kangaroo jump higher than a house? Of course, a house doesn't jump at all.
  3. Bot: Thanks
  4. User: Hallo!!!
  5. Bot: Tell me a good hoke (again same conversation)
  6. ....

But i want this

  1. Bot: Tell me a good joke
  2. user: Can a kangaroo jump higher than a house? Of course, a house
    doesn't jump at all
  3. Bot: Thanks
  4. Bot: Tell me a good hoke (again same conversation)
  5. ....

    return Chain.From(() => FormDialog.FromForm(BuildForm, FormOptions.PromptInStart))

      .Switch( . //Code . ) .Unwrap().PostToUser(); 

You can send multiple messages before put the bot into 'wait' state

connector.Conversations.ReplyToActivity(incomingMessage.CreateReply("Thanks", "en"));
connector.Conversations.ReplyToActivity(incomingMessage.CreateReply("Tell a good hoke", "en"));

https://docs.botframework.com/en-us/csharp/builder/sdkreference/routing.html#multiplereplies

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM