本文整理汇总了TypeScript中botbuilder.SuggestedActions.create方法的典型用法代码示例。如果您正苦于以下问题:TypeScript SuggestedActions.create方法的具体用法?TypeScript SuggestedActions.create怎么用?TypeScript SuggestedActions.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类botbuilder.SuggestedActions
的用法示例。
在下文中一共展示了SuggestedActions.create方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getSuggestedActions
function getSuggestedActions(session: Session): SuggestedActions {
const yes = session.localizer.gettext(session.preferredLocale(), 'confirmation.yesOption');
const no = session.localizer.gettext(session.preferredLocale(), 'confirmation.noOption');
const cancel = session.localizer.gettext(session.preferredLocale(), 'confirmation.cancelOption');
return SuggestedActions.create(session, [
CardAction.imBack(session, yes, yes),
CardAction.imBack(session, no, no),
CardAction.imBack(session, cancel, cancel)]);
}
示例2: getSuggestedActions
function getSuggestedActions(session: Session): SuggestedActions {
const faq = session.localizer.gettext(session.preferredLocale(), 'master.faqOption');
const feedback = session.localizer.gettext(session.preferredLocale(), 'master.feedbackOption');
const complaints = session.localizer.gettext(session.preferredLocale(), 'master.complaintsOption');
const language = session.localizer.gettext(session.preferredLocale(), 'master.languageOption');
return SuggestedActions.create(session, [
CardAction.imBack(session, faq, faq),
CardAction.imBack(session, feedback, feedback),
CardAction.imBack(session, complaints, complaints),
CardAction.imBack(session, language, language)]);
}
示例3: getSuggestedActions
function getSuggestedActions (library: Library, session: Session): SuggestedActions {
const finish = session.localizer.gettext(session.preferredLocale(), 'faq.finishOption', library.name);
return SuggestedActions.create(session, [
CardAction.imBack(session, finish, finish)]);
}