2017-09-25 79 views
0

我有一个英雄卡,打开一个URL,当用户敲击它:MS博特框架:开始对话框当用户对英雄卡丝锥

const message = new builder.Message(session); 
    message.attachmentLayout(builder.AttachmentLayout.carousel); 
    message.addAttachment(
     new builder.HeroCard(session) 
      .title('Title') 
      .tap(builder.CardAction.openUrl(session, 'https://www.google.com')) 
      .images([builder.CardImage.create(session, url)])); 

我怎样才能改变tap()行动,使而不是打开一个URL开始一个特定的对话框? (就像我会用session.beginDialog('DialogID');)?

回答

0

更改openUrl要么imBack(如果你希望用户看到发送给机器人的消息)或postBack(隐藏发送给机器人的消息)。

因此,像

.tap(builder.CardAction.imBack(session, 'I have been tapped'))