关于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

最新文章

  1. Scala学习笔记一
  2. C语言中运算符的口决
  3. MyEclipse8.6 破解以及注册码
  4. mysql innodb 数据打捞(三)innodb 簇不连接页的扫描提取(计划)
  5. 一般处理程序中使用Session出现未将对象引用设置到对象的实例
  6. Android 每隔3s更新一次title
  7. 关于js事件冒泡和时间捕获
  8. c++中可以对类中私有成员中的静态变量初始化吗?
  9. 10-18 noip提高组模拟赛(codecomb)T1倍增[未填]
  10. php中的多条件查询
  11. cxf webservice请求https
  12. [蓝牙前沿应用] 照明即平台 —— 通过蓝牙增强服务提高照明投资回报率(蓝牙MESH、定位AoA、AoD)
  13. BZOJ4665: 小w的喜糖 DP
  14. java mail 接收邮件
  15. 第七篇: 消息总线(Spring Cloud Bus)
  16. Android Service用法知识点的讲解
  17. Python 时间复杂度
  18. 11G新特性 -- flashback data archive(1)
  19. 虚拟机console基础环境部署——工作目录准备
  20. iOS开发-Certificates、Identifiers和Profiles详解

热门文章

  1. ACM1753大明A+B
  2. git revert HEAD
  3. JavaScript之typedof,instanceof,Array.isArray()
  4. Nginx完整配置配置样例
  5. git设置免密码登录
  6. u3d局域网游戏网络(c# socket select 模型)
  7. quick 用系统浏览器打开url
  8. 作为一名前端开发工程师,你必须掌握的WEB模板引擎:Handlebars
  9. John's trip(POJ1041+欧拉回路+打印路径)
  10. idea编写的java代码,在cmd运行乱码解决方案