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


TypeScript BotConnectorBot.verifyBotFramework方法代码示例

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


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

示例1: function

            for (var idx = 0; idx < result.length; idx++) {
                var info = result[idx];
                stateInfo = stateInfo + info["country"] + "-" + info["name"] + ",";
                console.log(info["country"] + "-" + info["name"]);	
                //console.log(stateInfo);
            }
            session.send("Hello " + session.userData.name + "! I am going to check the " + session.userData.product +
                " availability for the address:" + session.userData.address + ", ZipCode:" + session.userData.zipCode +
                "\nList of States for your country code:" + session.userData.countryCode + "\n" + stateInfo);

        });
    }
]);

var server = restify.createServer();
server.use(bot.verifyBotFramework({"appId":process.env.appId, "appSecret": process.env.appSecret}));
server.post("/api/messages", bot.listen());
server.listen(8080, function() {
	console.log("%s listening to %s", server.name, server.url);
});

/*

/*-----------------------------------------------------------------------------
This is a sample Verizon Bot which helps the customer by prompting series of
questions to understand the customer intents and helping them to assist
the customers by showing the Verizon offers and helping them to order placements.
 
@author: giriganapathy
@since: May 5, 2016 01:32 PM
-----------------------------------------------------------------------------
开发者ID:giriganapathy,项目名称:CheckServiceAvailabilityApp,代码行数:31,代码来源:server.ts

示例2: function

    },
    function (session, results) {
        if (results.response) {
            session.send("Please click the Terms of Service Page.");            
        }
        else {
            session.send("Ok no problem.");            
        }
        
        delete session.userData.userNameReceivedFlag;
        delete session.userData.nameAlreadyAsked;
        delete session.userData.name;
        delete session.userData.selectedOffer;
        delete session.userData.zipCode; 
        delete session.userData.serviceAvailable;         
        session.endDialog();
    }
]);


//dialog.onDefault(builder.DialogAction.send("I am sorry, i did not understand your answser"));

//bot.listenStdin();
var server = restify.createServer();
//server.use(bot.verifyBotFramework({ appId: process.env.appId, appSecret: process.env.appSecret }));
server.use(bot.verifyBotFramework());
server.post("/api/messages", bot.listen());
server.listen(process.env.port, function () {
    console.log("%s listening to %s", server.name, server.url);
});
开发者ID:giriganapathy,项目名称:VZChatBotApp,代码行数:30,代码来源:server.ts

示例3: function

dialog.on("intent.channel", [
    function (session, args, next) {
        //session.userData.selectedPackageName = "Custom TV Essentials";
        //session.send("From:" + session.message.from.channelId);
        var entity = builder.EntityRecognizer.findEntity(args.entities, 'channel-name');
        if (null != entity) {
            var channelName = entity.entity;
            if (null != channelName) {
                session.message.text = channelName;
                session.beginDialog('/query-package');
            }
            else {
                //session.send("Sorry! I did not understand...Please type the channel name again...");
                session.beginDialog('/query-package');
            }
        }
        else {
            //session.send("Sorry! I did not understand...Please type the channel name again 2...");
            session.beginDialog('/query-package');
        }
    }
]);
//bot.listenStdin();
var server = restify.createServer();
server.use(bot.verifyBotFramework({ appId: process.env.appId, appSecret: process.env.appSecret }));
//server.use(bot.verifyBotFramework());
server.post("/api/messages", bot.listen());
server.listen(process.env.port, function () {
    console.log("%s listening to %s", server.name, server.url);
});
开发者ID:giriganapathy,项目名称:FiOSPackageHelper,代码行数:30,代码来源:server.ts


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