微信公众平台提供的开放信息接口的自动回复系统,基于node.js
实现。
- 清晰独立的 router ,轻松实现文本匹配流程控制
- 基于正则表达式的对话设定,配置简单,可以给一句话随机回复不同内容
- 支持等待后续操作模式,如可以提示用户“需要我执行xxx操作吗?”
添加微信帐号 douban-event ,试试效果
可通过 npm 安装:
npm install weixin-robot
具体使用方法参见 exapmles/app.js
。
提供可执行文件 webot
用于发送测试消息。
Usage: webot [options]
Options:
-h, --help output usage information
-V, --version output the version number
-l, --location Send a <location> (geo, latlng)
-t, --token [value] Provide weixin token
-n, --host [value] Set request hostname, defaults to 127.0.0.1
-p, --port <n> The port your service is listening to, defaults to 3000
-d, --destination [value] The request destination url, will override "host" and "port"
Have fun with weixin, enjoy being a robot!
(the DON'T CARE WHAT YOU DO WITH IT license)