1.0.4 • Published 1 year ago

koishi-plugin-adapter-wechat-official v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

koishi-plugin-adapter-wechat-official

Koishi 微信公众号适配器。

由于微信的限制,该适配器无法主动推送消息,只能被动回复消息,请注意。

安装

npm

npm install koishi-plugin-adapter-wechat-official

直接安装

https://cdn02.moecube.com:444/nanahira/koishi-plugin/adapter-wechat-official/index.js 下载即可。

配置

plugins:
  adapter-wechat-official:
    path: /wechat # 回调路径。若有多个则每个都需要不同。
    appId: appId # 公众号 AppID
    appSecret: appSecret # 公众号 AppSecret
    token: token # 公众号 Token
    encodingAESKey: encodingAESKey # 公众号 EncodingAESKey,如果有的话
    menus:
      - type: click # 一级菜单
        name: 帮助
        command: help # 点击后等同于该指令
      - type: parent
        name: 查询
        children:
          - type: click # 二级菜单
            name: 今日运势
            command: fortune
          - type: click
            name: 今日人品
            command: jrrp

事件

  • wechat:subscribe 用户关注公众号时触发
  • wechat:unsubscribe 用户取消关注公众号时触发