Is there an easy way to repeat the last bot response after a speedy or controller bypass

During a bot conversation, if the user's response is "disabled", there is an easy way to repeat the last bot response (usually a question). I would not want to store the last bit response in the data store.

Example:

Bot: What is your name?

User: John

Bot: Hi John. How old are you?

User: help

Bot: To use this bot, just answer simple questions and don't change your mind.

Bot: Hi John. How old are you?

User: 25

I'm not sure if this is possible using the adjusted or my preference in the messageController Post method using the dialog stack, as in:

if (activity.Text != null && (activity.Text.ToLower() == "help"))
{
    var scope = DialogModule.BeginLifetimeScope(Conversation.Container, activity))
    {
        var stack = scope.Resolve<IDialogStack>();
        // DO something here?
    }
}
+4
source share

Source: https://habr.com/ru/post/1670672/


All Articles