所以在旋转木马中我有builder.CardAction.imBack(session, 'relatedStuff', 'Related stuff'),
并且我选择匹配时匹配匹配并处理如下所示的新对话框:
bot.dialog('relatedStuff', (session, args, next) => {
// console.log(session, '<<<<<< SESSION');
session.endDialog('This is a simple bot that collects a name and age.');
}).triggerAction({
matches: /^relatedStuff$/,
onSelectAction: (session, args, next) => {
session.beginDialog(args.action, args);
},
});
如何识别被选中的内容而非进行匹配?
例如,
builder.CardAction.imBack(session, data.name, 'Related events'),
并执行一个说明if (data.name === 'something) { do something.. }
如果我事先不知道这个值,我在文档中找不到任何告诉我如何识别被选中内容的内容。