Giter VIP home page Giter VIP logo

koishi-plugin-gocqhttp's Introduction

本插件停止维护

请移步:Mrs4s/go-cqhttp#2471

愿我们能在更加开放的平行世界再次相遇。


koishi-plugin-gocqhttp

npm

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

目前支持以下功能:

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

安装

npm install koishi-plugin-gocqhttp

使用方法

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

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

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

koishi-plugin-gocqhttp's People

Contributors

ilharp avatar maikotan avatar microcber avatar mnixry avatar programripper avatar shigma avatar uyloal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

koishi-plugin-gocqhttp's Issues

Bug: go-cqhttp插件在处理QQ开启设备锁情形下,无法处理用户输入

Describe the bug

当QQ账号已开启设备锁,需要选择验证方式时,不能自己选择,始终选择2手机扫码验证,如下图1所示,且扫码验证不能进入正常流程,如下图2,图2的问题go-cqhttp也存在,我也会在go-cqhttp提issue、
image
image

Steps to reproduce

在koishi中配置QQ和密码,且QQ开启设备锁

Expected behavior

下图为go-cqhttp的截图
image

Screenshots

No response

Versions

  • OS: MacOS v10.13.6
  • Backend service: go-cqhttp :v1.0.0-rc1
  • Node version: v16.13.0
  • Koishi version: v4.5.2
  • koishi-plugin-gocqhttp version: 2.2.4

Additional context

No response

Feature: 支持修改和删除 device.json

大致有两种方案:

方案 1

添加单一配置项 gocqhttp.device,用户可以在这里配置使用的设备类型。

每次启动时,如果没有 device.json,则根据此项配置创建;如果此配置与现有的 device.json 不一致,则重新创建。

  • Q:为什么不在控制台允许配置 device.json 中的每一个属性?
  • A:因为 device.json 中的部分属性是随机生成的,不方便设置默认值。

方案 2

为每个 onebot 实例增加上传和下载 device.json 和 session.token 文件的按钮。

并增加一个额外的「创建新设备」按钮,可以弹出对话框配置 protocol 等属性。

sign-server报错

获取T544 sign时出现错误: data is empty

尝试自建和使用公共服务器均出现此报错
sign-server版本1.1.1
gochtt版本3.8.0

bug: voice convert failed after bumping the version

版本更新后语音转换出现问题

image

Error: Error with request send_group_msg, args: {"group_id":"427698449","message":[{"type":"record","data":{"file":"https://strawberrytree.top/convert/cache/sounds/voice/events/produce_events/200201511/2002015110120.m4a"}}]}, retcode: 100

其问题描述与 Mrs4s/go-cqhttp#1831 一致。推测为上游go-cqhttp的问题

Bug: 控制台插件配置,启用 gocqhttp 状态下首次点击 onebot 后不显示 gocqhttp 配置项

Describe the bug

控制台插件配置,启用 gocqhttp 状态下首次点击 onebot 后不显示 gocqhttp 配置项

Steps to reproduce

启动全新 Koishi 实例,立即点插件配置 - onebot,gocqhttp 配置项不显示,输入任意内容后出现

Expected behavior

点击 onebot 后 gocqhttp 配置项即存在

Screenshots

image

Versions

  • OS: Windows 11
  • Platform: OneBot
  • Node version: 16.17.0
  • Koishi version: 4.11.0

Additional context

No response

能否暴露gocqhttp的端口供外部机器人使用?

感谢开发此插件。

我想配置 chatgpt-mirai-qq-bot ,其 onebot 配置项只提供host和port字段。

[onebot]
qq=请修改为你机器人的QQ号
manager_qq = 请修改为机器人管理员的QQ号

reverse_ws_host = "0.0.0.0"
reverse_ws_port = 8566

该插件的 gocqhttp 貌似是监听在 ws://<host:port>/onebot

在配置页可以配置 host 监听所有地址,却没有端口配置,不知理解是否正确。

无法在arm64架构平台上正确构建go-cqhttp

复现操作

  1. 执行yarn create koishi(如未选择立刻启动还需执行yarn命令)
  2. 在[4/4] Building fresh packages...步骤中发生错误

查看错误报告可以发现yarn在下载一个文件时使用了错误的链接(?)
该问题在更换源后仍无法解决(尝试使用了官方源,淘宝源,南大源,浙大源)
发生错误后仍然可以正常启动

日志

是在构建时的输出

补充说明

  • OS: Raspberry Pi OS with desktop (32bit, v6.1, arm v8a)
  • Node version: 18.17.0
  • Koishi version: 4.14.1

Bug: gocqhttp 连接 ws 反向出错

Describe the bug

2023-05-09 10:24:49 [W] gocqhttp 连接到反向WebSocket Universal服务器 ws://127.0.0.1:5140/onebot 时出现错误: dial tcp 127.0.0.1:5140: connectex: No connection could be made because the target machine actively refused it.

Steps to reproduce

在更新最新版 onebot 5.7.0gocqhttp 3.5.1 的时候会报错
onebot 显示已经连接, 实质上是没有正确连接上

Expected behavior

正确连接并能使用

Screenshots

No response

Versions

  • OS:
  • Platform: onebot
  • Node version: 18
  • Koishi version: 4.12.8

Additional context

No response

Feature: 支持配置是否显示 debug 等级日志(所有收发消息)

来自用户群内 2 位小伙伴的功能请求:

上个版本的 gocq 插件存在来自 go-cqhttp 的 bug,debug 等级的日志会默认显示,导致了较大的日志体积。gocq 侧已将此 bug 修复,最新版本插件已经不会再显示 debug 等级的日志。

但与此同时,Koishi 控制台将无法看到 gocq 收发的消息,对以前通过 Koishi 控制台日志除错的小伙伴造成了不便。

希望能够添加日志等级选项,提供一种恢复所有收发消息记录日志的方案。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.