1.0.0 • Published 1 year ago

koishi-plugin-apisend v1.0.0

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

koishi-plugin-apisend

API 推送消息插件。

安装

npm

npm install koishi-plugin-apisend

直接安装

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

配置

部分配置见 koishi-target-def 的定义。

# koishi.yaml
plugins:
  apisend:foo:
    path: '/send'
    token: koishi # 如果有的话,Authorization: Bearer <token>
    targets: # 见 koishi-target-def
      - bot: 'onebot:1111111111'
        users:
          - '2222222222'

使用

POST /send 或自己指定的路径。

参数

  • content: string 消息内容。

返回

  • messageIds: string[] 消息 ID。

  • error: string 错误信息。