When I enter the "reset" command, I want the conversation restart again and clear all the previous dialog, May I ask about how to do it? I had stuck for 2 days. Thank in advanced.
Here with my source code.
bot.dialog('/reset', (session) => {
session.endDialog();
var msg = new builder.Message(session)
.addAttachment(welcomecard_1.welcomeCard());
session.send(msg);
})
.triggerAction({
matches: /^reset$/i
});
After I enter the "reset" or "/reset"
the previous conversation [in red color] will remove from the dialog and this channel is using direct line.
Updated: I had try this code , but not work.
bot.use(builder.Middleware.dialogVersion({ version: 1.0, resetCommand: /^reset/i }));