我有一张Hero卡,当用户点击它时会打开一个网址:
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 :(得分:0)
将openUrl
更改为imBack
(如果您希望用户看到发送给机器人的消息)或postBack
(隐藏发送给机器人的消息)。< / p>
类似
.tap(builder.CardAction.imBack(session, 'I have been tapped'))