BotFramework Nodejs示例
关于Bot Framework知识,可以参考《Nodejs Bot学习》
本文是根据bot framework sample《https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node》写出的个人学习资料
示例一:core-SendAttachment(发送附件)(https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/core-SendAttachment)
发送附件时,有两种方式
一种是将本地图片base64化,发送出去
一种是将网络图片直接发送出去,使用图片URL
示例二:core-ReceiveAttachment(接收附件)(https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/core-ReceiveAttachment)
通过接收session.message.attachmentsp[0]获取附件
示例三:core-CreateNewConversation(新创建对话)(https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/core-CreateNewConversation)
第一次用户创建对话时,保存用户的地址,然后创建一个新对话,并将地址加入至临时区
待五秒后,会循环临时区,获取用户的地址,并开户一个新的对话,使用对应的地址
示例三:core-GetConversationMembers(获取对话的对象)(https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/core-GetConversationMembers)
在conversationUpdate事件中,获取用户的信息
示例五:core-MultiDialogs(多对话)(https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/core-MultiDialogs)
选择一时,故意抛出错误
选择二时,就是普通的瀑布流对话
示例六:core-State(保存数据)(https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/core-State)
通过保存和提取用户数据(userData),会话数据(privateConversationData)
提取和保存userData
\
提取和保存privateConversationData
示例七:core-CustomState(用户自定义状态)(https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/core-CustomState)
最新文章
- Scala学习笔记一
- C语言中运算符的口决
- MyEclipse8.6 破解以及注册码
- mysql innodb 数据打捞(三)innodb 簇不连接页的扫描提取(计划)
- 一般处理程序中使用Session出现未将对象引用设置到对象的实例
- Android 每隔3s更新一次title
- 关于js事件冒泡和时间捕获
- c++中可以对类中私有成员中的静态变量初始化吗?
- 10-18 noip提高组模拟赛(codecomb)T1倍增[未填]
- php中的多条件查询
- cxf webservice请求https
- [蓝牙前沿应用] 照明即平台 —— 通过蓝牙增强服务提高照明投资回报率(蓝牙MESH、定位AoA、AoD)
- BZOJ4665: 小w的喜糖 DP
- java mail 接收邮件
- 第七篇: 消息总线(Spring Cloud Bus)
- Android Service用法知识点的讲解
- Python 时间复杂度
- 11G新特性 -- flashback data archive(1)
- 虚拟机console基础环境部署——工作目录准备
- iOS开发-Certificates、Identifiers和Profiles详解