Skip to content

AwesomeHamster/koishi-plugin-gocqhttp

 
 

Repository files navigation

koishi-plugin-gocqhttp

npm

此插件将自动下载 go-cqhttp,并在启动时自动运行,从而支持无需后端的 @koishijs/plugin-adapter-onebot。

目前支持以下功能:

  • 扫描二维码登录
  • 手机短信验证码
  • captcha 图片
  • 滑条验证
  • 设置设备信息

安装

npm install koishi-plugin-gocqhttp

此插件在安装时支持以下环境变量:

  • GITHUB_MIRROR:下载所用的 GitHub 镜像,默认为 https://github.com
  • GOCQHTTP_VERSION:要使用的 go-cqhttp 版本,设置为 latest 则使用最新版本,当前默认为 v1.0.0-rc3

使用方法

要使用此插件,需要完成两步配置:

# koishi.yml
plugins:
  # 1. 添加这个插件
  gocqhttp:

  adapter-onebot:
    selfId: '123456789'
    protocol: ws-reverse
    # 2. 向机器人配置中添加 gocqhttp 属性
    # 未设置 enabled=true 的机器人不会创建子进程
    gocqhttp:
      enabled: true
      password: xxxxx

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 70.7%
  • Vue 26.5%
  • JavaScript 2.8%