我对builder.prompt.text有问题,当用户响应时,则会重定向到main" /"对话框,它不会去下一个瀑布/对话框
问题是可能导致这种情况的?
我的机器人每天运行,某些时间并检查用户需要提问的数据库,然后创建对话框
即时通讯使用最新的bot builder依赖项。 感谢
var restify = require('restify');
var builder = require('botbuilder');
.....
var server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function () {
console.log('%s listening to %s', server.name, server.url);
});
// Create chat bot
var connector = new builder.ChatConnector({
appId: AppId,
appPassword: AppPass
});
var bot = new builder.UniversalBot(connector);
server.post('/api/messages', connector.listen());
.....
bot.dialog('/', [
function (session) {
console.log(session);
}
]);
....
bot.beginDialog(createAddress(user), '/users');
.....
bot.dialog('/users', [
function (session) {
session.sendTyping();
session.options.logger.isEnabled = true;
builder.Prompts.text(session, "Question comes here.");
// after response goes to dialog "/"
},
function (session, results) {
// wont come here
builder.Prompts.text(session, "Question comes here1.");
}
]);