当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Prompts.text方法代码示例

本文整理汇总了TypeScript中botbuilder.Prompts.text方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Prompts.text方法的具体用法?TypeScript Prompts.text怎么用?TypeScript Prompts.text使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在botbuilder.Prompts的用法示例。


在下文中一共展示了Prompts.text方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: function

 function (session, args, next) {
     if (!session.userData.nameAlreadyAsked) {
         builder.Prompts.text(session, "May i know your name please?");
     }
     else {
         next();
     }
 },
开发者ID:giriganapathy,项目名称:VZChatBotApp,代码行数:8,代码来源:server.ts

示例2: function

 function(session, args, next) {
     console.log("args :: \n" + JSON.stringify(args.entities));
     var symbol = builder.EntityRecognizer.findEntity(args.entities, 'company');
     if (!symbol) {
         builder.Prompts.text(session, "Which company stock you are intrested in?");
     } else {
         next({ response: symbol.entity });
     }
 },
开发者ID:plkumar,项目名称:StockBot,代码行数:9,代码来源:server.ts

示例3:

        (session, args, next) => {
            const botName = '<%= botName %>';
            const description = `<%= botDescription %>`;

            session.send(`Hi there! I'm ${botName}`);
            session.send(`In a nutshell, here's what I can do:\n\n${description}`);

            builder.Prompts.text(session, `What's your name?`);
        },
开发者ID:kalappaBadiger,项目名称:BotBuilder,代码行数:9,代码来源:echo.ts

示例4: function

 function (session, results, next) {
     if (true === results.response) {
         session.userData.channelSearchResultsShown = false;
         builder.Prompts.text(session, "Hey .. that’s cool.. Can i have the channel names which you are looking for?");
     }
     else {
         delete session.userData.channelSearchResultsShown;
         session.endDialog("Thanks! Say 'Hi', if you want to chat with me again...");
     }
 },
开发者ID:giriganapathy,项目名称:FiOSPackageHelper,代码行数:10,代码来源:server.ts

示例5: getCharacterName

    private getCharacterName(session: Session, results, next) {
        var charData = session.dialogData.character;
		console.log('getcharname', charData);
        
        if (results.response) {
            charData.name = results.response;
        }
        
        if (!charData.realm) {
            Prompts.text(session, "What is the realm of the character?");
        } else {
            next();
        }
    }
开发者ID:DHainzl,项目名称:ILvlBot,代码行数:14,代码来源:ILvlBot.ts

示例6: step1

    private static async step1(session: builder.Session, args?: any | builder.IDialogResult<any>, next?: (args?: builder.IDialogResult<any>) => void): Promise<void> {
        if (!isMessageFromChannel(session.message)) {
            session.send(Strings.cmd_only_works_in_channel);
            session.endDialog();
            return;
        }

        let channelNameInput = args.intent.matched[1].trim();
        if (channelNameInput) {
            next({ response: channelNameInput });
        } else {
            builder.Prompts.text(session, Strings.choose_channel_prompt);
        }
    }
开发者ID:gvprime,项目名称:microsoft-teams-sample-complete-node,代码行数:14,代码来源:ProactiveMsgToChannelDialog.ts


注:本文中的botbuilder.Prompts.text方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。