1.0.0 • Published 8 months ago

koishi-plugin-bot-push v1.0.0

Weekly downloads
-
License
AGPL-3.0
Repository
-
Last release
8 months ago

koishi-plugin-bot-push

npm

这是一个 Koishi 的推送服务插件,允许你通过 HTTP 请求将消息推送到用户或群组。

特性

  • 发送私聊消息给用户。
  • 发送群组消息给群组。
  • 基于 HTTP 的推送消息 API。
  • 通过服务密钥进行认证。

配置

插件配置可以在 Koishi 后台的配置页面进行设置。

API 使用

你可以通过 HTTP GET 请求向以下接口发送消息:

GET http://<bindIp>:<port>/api/push?text=<message>&target=<targetId>&bot=<botId>&token=<authenticationToken>&type=<type>
  • text:要发送的消息内容。
  • bot:发送消息的机器人 ID。
  • token:用于验证请求的认证密钥。
  • 发送目标(二选一):
    • user:目标用户 ID。
    • group:目标群组 ID。

成功响应

{
  "success": true
}

错误响应

  • 缺少参数:
{
  "error": "Missing required parameters"
}
  • 无效的 token:
{
  "error": "Invalid token"
}
  • 无效的用户或群聊:
{
  "error": "Invalid user or group"
}
  • 找不到接口(无效的 URL):
{
  "error": "Not found"
}
1.0.0

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago