简体   繁体   English

Bot Framework V4 UniversalBot nodejs

[英]Bot Framework V4 UniversalBot nodejs

What's the alternative of UniversalBot(v3) in v4. v4 中 UniversalBot(v3) 的替代方案是什么? Can anybody give me a straight answer?.谁能给我一个直接的答案? I've read the documentation but i can't figure it out.我已经阅读了文档,但我无法弄清楚。

There are comprehensive v3 to v4 migration docs in the official documentation.官方文档中有全面的 v3 到 v4 迁移文档。 You don't mention any sort of context for what you're doing, so I'm going to go with a general answer:你没有提到你在做什么的任何背景,所以我会用一个一般的答案去 go :

To create a bot instance:要创建机器人实例:

v3 v3

var bot = new builder.UniversalBot(connector, [ ...DIALOG_STEPS ]);

v4 v4

// Define the bot class as extending ActivityHandler.
const { ActivityHandler } = require('botbuilder');

class MyBot extends ActivityHandler {
    // ...
}

// Instantiate a new bot instance.
const bot = new MyBot(conversationState, dialog);

That's off the official migration doc found here这与此处找到的官方迁移文档无关

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM