本文整理汇总了TypeScript中botbuilder.UniversalBot.set方法的典型用法代码示例。如果您正苦于以下问题:TypeScript UniversalBot.set方法的具体用法?TypeScript UniversalBot.set怎么用?TypeScript UniversalBot.set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类botbuilder.UniversalBot
的用法示例。
在下文中一共展示了UniversalBot.set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
appId: process.env.MICROSOFT_APP_ID,
appPassword: process.env.MICROSOFT_APP_PASSWORD
});
// Listen for messages from users
server.post('/api/messages', connector.listen());
// Bot instantiation
var bot = new builder.UniversalBot(connector, (session) => session.replaceDialog("greetings:start", "default"));
// Enable conversation states (storage in azure)
if (enableAzureTableState) {
console.log(`State will be stored in Azure Table Storage. Table Name: ${stateAzureTableName}, Storage Name: ${stateAzureStorageAccountName}`);
let azureTableClient = new storage.AzureTableClient(stateAzureTableName, stateAzureStorageAccountName, stateAzureStorageAccountKey);
let tableStorage = new storage.AzureBotStorage({gzipData: false}, azureTableClient);
bot.set('storage', tableStorage);
}
//=========================================================
// Bot Dialogs Configuration
//=========================================================
// <<< --- ADD YOUR LIBRARIES HERE --- >>>
bot.library(locationDialog.createLibrary(process.env.BING_MAPS_API_KEY));
bot.library(greetings.createLibrary());
bot.library(medication.createLibrary());
bot.library(medicationprompt.createLibrary());
bot.library(countryprompt.createLibrary());
bot.library(places.createLibrary());
bot.library(imagedetection.createLibrary());