Git Product home page Git Product logo

llonebot's Issues

对新版QQ下发送消息失败的问题

版本说明:
QQNT:9.9.7-21357 (64位)
LiteLoader:1.0.3
Chromium:120.0.6099.56
Electron:28.0.0
Node.js:18.18.2
LLAPI:1.3.1
操作:
POST http://192.168.10.101:3000/send_msg
发送数据:
{ "message_type": "group", "group_id": 701339984, "message": [ { "type": "text", "data": { "text": "哈喽!" } } ], "auto_escape": false }
响应数据:
{ "retcode": 0, "status": 0, "data": {}, "message": "发送成功" }
消息内容并没有发出,只是一直像这样转圈
1AEFA10127522ED0AF430E96AB79DE4E
一段时间后显示红色感叹号(发送失败)
日志信息:
2024/2/4 17:39:48 Fervent Tempo Δ(<botQQ>):"selfInfo {\"uid\":\"<myUID>\",\"qid\":\"\",\"uin\":\"<botQQ>\",\"avatarUrl\":\"\",\"nickName\":\"Fervent Tempo Δ\",\"bio\":\"叮!变成星星吧!\",\"sex\":\"female\",\"raw\":{\"uid\":\"<myUID>\",\"qid\":\"\",\"uin\":\"<botQQ>\",\"nick\":\"Fervent Tempo Δ\",\"remark\":\"\",\"longNick\":\"叮!变成星星吧!\",\"avatarUrl\":\"\",\"birthday_year\":2020,\"birthday_month\":6,\"birthday_day\":1,\"sex\":2,\"topTime\":\"0\",\"isBlock\":false,\"isMsgDisturb\":false,\"isSpecialCareOpen\":false,\"isSpecialCareZone\":false,\"ringId\":\"0\",\"status\":0,\"qidianMasterFlag\":0,\"qidianCrewFlag\":0,\"qidianCrewFlag2\":0,\"extStatus\":0,\"categoryId\":0,\"onlyChat\":false,\"qzoneNotWatch\":false,\"qzoneNotWatched\":false,\"vipFlag\":false,\"yearVipFlag\":false,\"svipFlag\":false,\"vipLevel\":1,\"isZPlanCoupleOpen\":false,\"zplanCoupleSceneId\":0,\"teenagerFlag\":0,\"studyFlag\":0}}" 2024/2/4 17:39:48 Fervent Tempo Δ(<botQQ>):"llonebot loaded" 2024/2/4 17:39:48 Fervent Tempo Δ(<botQQ>):"llonebot render start" 2024/2/4 17:39:48 Fervent Tempo Δ(<botQQ>):"发送消息API已注册" 2024/2/4 17:39:49 Fervent Tempo Δ(<botQQ>):"llonebot render onLoad" 2024/2/4 17:39:50 Fervent Tempo Δ(<botQQ>):"全部群成员获取完毕" 2024/2/4 17:39:52 Fervent Tempo Δ(<botQQ>):"llonebot render onLoad" 2024/2/4 17:40:31 Fervent Tempo Δ(<botQQ>):"setting window created" 2024/2/4 17:40:37 Fervent Tempo Δ(<botQQ>):"llonebot render onLoad" 2024/2/4 17:40:52 Fervent Tempo Δ(<botQQ>):"API receive post:{\"message_type\":\"private\",\"user_id\":<myQQ>,\"message\":[{\"type\":\"text\",\"data\":{\"text\":\"你好!\"}}],\"auto_escape\":false,\"action\":\"send_private_msg\"}" 2024/2/4 17:41:22 Fervent Tempo Δ(<botQQ>):"API receive post:{\"group_id\":<groupID>,\"message_type\":\"group\",\"message\":[{\"data\":{\"text\":\"帮助菜单\\n============\\n@我 <命令><参数>即可使用。\\n-发*话(文本):@我 来点*话\\n-发*话(语音):@我 来点语音*话\\n-复读机(语音):@我 复读:<内容>\\n-复读机(文本):@我 复读文本:<内容>\\n-随机图片:@我 来点二次元\\n-开空调:@我 开空调\\n-闭空调:@我 关空调\\n-设置温度:@我 设置温度<温度>\\n-查询温度:@我 查询温度\\n-帮助:@我 帮助\\n-帮助:@我 help\\n============\"},\"type\":\"text\"}],\"action\":\"send_group_msg\"}" 2024/2/4 17:41:24 Fervent Tempo Δ(<botQQ>):"新消息事件上传成功: http://192.168.10.101:8888/ {\"self\":{\"platform\":\"qq\",\"user_id\":\"<botQQ>\"},\"self_id\":\"<botQQ>\",\"time\":1707039682,\"type\":\"message\",\"post_type\":\"message\",\"message_type\":\"group\",\"detail_type\":\"group\",\"message_id\":\"7331679609204350391\",\"sub_type\":\"group\",\"message\":[{\"data\":{\"mention\":\"<botQQ>\",\"qq\":\"<botQQ>\"},\"type\":\"at\"},{\"data\":{\"text\":\" 帮助\"},\"type\":\"text\"}],\"raw_message\":\"\",\"font\":14,\"group_id\":\"<groupID>\",\"user_id\":\"<myQQ>\",\"sender\":{\"user_id\":\"<myQQ>\",\"nickname\":\"<myNickName>\",\"card\":\"万号之主\",\"role\":\"owner\"}}" 2024/2/4 17:43:16 Fervent Tempo Δ(<botQQ>):"API receive post:{\"group_id\":<groupID>,\"message_type\":\"group\",\"message\":[{\"data\":{\"text\":\"帮助菜单\\n============\\n@我 <命令><参数>即可使用。\\n-发*话(文本):@我 来点*话\\n-发*话(语音):@我 来点语音*话\\n-复读机(语音):@我 复读:<内容>\\n-复读机(文本):@我 复读文本:<内容>\\n-随机图片:@我 来点二次元\\n-开空调:@我 开空调\\n-闭空调:@我 关空调\\n-设置温度:@我 设置温度<温度>\\n-查询温度:@我 查询温度\\n-帮助:@我 帮助\\n-帮助:@我 help\\n============\"},\"type\":\"text\"}],\"action\":\"send_group_msg\"}" 2024/2/4 17:43:18 Fervent Tempo Δ(<botQQ>):"新消息事件上传成功: http://192.168.10.101:8888/ {\"self\":{\"platform\":\"qq\",\"user_id\":\"<botQQ>\"},\"self_id\":\"<botQQ>\",\"time\":1707039795,\"type\":\"message\",\"post_type\":\"message\",\"message_type\":\"group\",\"detail_type\":\"group\",\"message_id\":\"7331680089068021932\",\"sub_type\":\"group\",\"message\":[{\"data\":{\"mention\":\"<botQQ>\",\"qq\":\"<botQQ>\"},\"type\":\"at\"},{\"data\":{\"text\":\" 帮助\"},\"type\":\"text\"}],\"raw_message\":\"\",\"font\":14,\"group_id\":\"<groupID>\",\"user_id\":\"<myQQ>\",\"sender\":{\"user_id\":\"<myQQ>\",\"nickname\":\"<myNickName>\",\"card\":\"万号之主\",\"role\":\"owner\"}}" 2024/2/4 17:45:02 Fervent Tempo Δ(<botQQ>):"API receive post:{\"message_type\":\"group\",\"group_id\":<groupID>,\"message\":[{\"type\":\"text\",\"data\":{\"text\":\"哈喽!\"}}],\"auto_escape\":true,\"action\":\"send_group_msg\"}" 2024/2/4 17:45:54 Fervent Tempo Δ(<botQQ>):"setting window created" 2024/2/4 17:46:01 Fervent Tempo Δ(<botQQ>):"llonebot render onLoad" 2024/2/4 17:47:40 Fervent Tempo Δ(<botQQ>):"API receive post:{\"message_type\":\"group\",\"group_id\":<groupID>,\"message\":[{\"type\":\"text\",\"data\":{\"text\":\"哈喽!\"}}],\"auto_escape\":false,\"action\":\"send_group_msg\"}" 2024/2/4 17:49:07 Fervent Tempo Δ(<botQQ>):"setting window created" 2024/2/4 17:49:14 Fervent Tempo Δ(<botQQ>):"llonebot render onLoad" 2024/2/4 17:49:19 Fervent Tempo Δ(<botQQ>):"llonebot render onLoad" 2024/2/4 17:50:42 Fervent Tempo Δ(<botQQ>):"setting window created" 2024/2/4 17:50:49 Fervent Tempo Δ(<botQQ>):"llonebot render onLoad" 2024/2/4 17:53:43 Fervent Tempo Δ(<botQQ>):"llonebot render onLoad"

当上报私聊消息时,上报消息的message_type应该为"private"而不是"friend"

发现版本:v2.1.0

以下是一个有错误的私聊上报示例:

{
  "self": {
    "platform": "qq",
    "user_id": ""
  },
  "self_id": "",
  "time": 1706688891,
  "type": "message",
  "post_type": "message",
  **"message_type": "friend",**
  "detail_type": "friend",
  "message_id": "",
  "sub_type": "friend",
  "message": [
    {
      "data": {
        "text": "来啦来啦~\n下午好~\n今天的天气:\n气温:17.0~25.0℃\n目前气温: 22.4℃\n一小时内降水量:0.0mm\n湿度:79.0%\n气压:1010.0hPa\n目前风向:东南风\n风速:1.7\n风力等级:微风"
      },
      "type": "text"
    }
  ],
  "raw_message": "",
  "font": 14,
  "user_id": "",
  "sender": {
    "user_id": "",
    "nickname": ""
  }
}

不会接收消息通过API, 希望能帮帮孩子qwq

QQ版本:9

LLAPI版本:最新

LLOneBot版本:最新

调用LLoneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):python直接http请求

您安装LLOneBot的步骤:

BUG描述:那个弱弱的问一句有没有消息上报的例子, 我只能通过调API发消息, 不会接收消息, 如果有的话十分感谢qwq

复现步骤:

[提问] 服务器如何将http服务绑定至内网ip

如题,用的tx云轻量 服务器1 部署bot,同时有公网ip和内网ip,
在同一内网的另一台 服务器2 测试发现在只能用公网ip访问 服务器1的api,而不能用内网ip访问
故想咨询是否有可选绑定ip的方法或其他解决办法?

事件上报中的图片消息

希望能在消息事件上报中的图片内容增加上图片url,目前看到只有本地文件路径。对于跨设备的分享不太方便。感谢大佬

希望添加图片表情支持

目前收到表情是这样的:

2024/2/18 14:04:29 傻fufu的(3380643076): 收到新消息 {"msgId":"7336818910017867029","msgRandom":"743031415","msgSeq":"66867","cntSeq":"0","chatType":2,"msgType":17,"subMsgType":8,"sendType":0,"senderUid":"u_XR0B9hYwlNtpPvs8WCFxPA","peerUid":"703195149","channelId":"","guildId":"","guildCode":"0","fromUid":"0","fromAppid":"0","msgTime":"1708236269","msgMeta":"0x","sendStatus":2,"sendRemarkName":"","sendMemberName":"","sendNickName":"玉子是个废物喵","guildName":"","channelName":"","elements":[{"elementType":11,"elementId":"7336818910017867028","extBufForUI":"0x","textElement":null,"faceElement":null,"marketFaceElement":{"itemType":6,"faceInfo":1,"emojiPackageId":236919,"subType":3,"mediaType":0,"imageWidth":200,"imageHeight":200,"faceName":"[哼啊啊啊]","emojiId":"788098e150c03359a6230afe00bc6d28","key":"3ff9ac7000ac14d3","param":null,"mobileParam":null,"sourceType":0,"startTime":0,"endTime":0,"emojiType":1,"hasIpProduct":0,"voiceItemHeightArr":null,"sourceName":null,"sourceJumpUrl":null,"sourceTypeName":"","backColor":null,"volumeColor":null,"staticFacePath":"/home/yuchuxi/.config/QQ/nt_qq_66e7900397d8072e982cf55ad59ab0fa/nt_data/Emoji/marketface/236919/788098e150c03359a6230afe00bc6d28_aio.png","dynamicFacePath":"/home/yuchuxi/.config/QQ/nt_qq_66e7900397d8072e982cf55ad59ab0fa/nt_data/Emoji/marketface/236919/788098e150c03359a6230afe00bc6d28","supportSize":[{"width":300,"height":300},{"width":200,"height":200}],"apngSupportSize":null},"replyElement":null,"picElement":null,"pttElement":null,"videoElement":null,"grayTipElement":null,"arkElement":null,"fileElement":null,"liveGiftElement":null,"markdownElement":null,"structLongMsgElement":null,"multiForwardMsgElement":null,"giphyElement":null,"walletElement":null,"inlineKeyboardElement":null,"textGiftElement":null,"calendarElement":null,"yoloGameResultElement":null,"avRecordElement":null,"structMsgElement":null,"faceBubbleElement":null,"shareLocationElement":null,"tofuRecordElement":null,"taskTopMsgElement":null}],"records":[],"emojiLikesList":[],"commentCnt":"0","directMsgFlag":0,"directMsgMembers":[],"peerName":"=(ㅇㅅㅇ)=机器人测试","freqLimitInfo":null,"editable":false,"avatarMeta":"","avatarPendant":"","feedId":"","roleId":"0","timeStamp":"0","clientIdentityInfo":null,"isImportMsg":false,"atType":0,"roleType":0,"fromChannelRoleInfo":{"roleId":"0","name":"","color":0},"fromGuildRoleInfo":{"roleId":"0","name":"","color":0},"levelRoleInfo":{"roleId":"0","name":"","color":0},"recallTime":"0","isOnlineMsg":true,"generalFlags":"0x","clientSeq":"0","fileGroupSize":null,"foldingInfo":null,"multiTransInfo":null,"senderUin":"3619545924","peerUin":"703195149","msgAttrs":{},"anonymousExtInfo":null,"nameType":0,"avatarFlag":0,"extInfoForUI":null,"personalMedal":null,"categoryManage":0,"msgShortId":1708185805507} 

2024/2/18 14:04:30 傻fufu的(3380643076): 新消息事件HTTP上报成功: http://127.0.0.1:47826/onebot/v11/ {"self_id":3380643076,"user_id":3619545924,"time":1708236269,"message_id":1708185805507,"real_id":"7336818910017867029","message_type":"group","sender":{"user_id":3619545924,"nickname":"玉子是个废物喵","card":"","role":"admin"},"raw_message":"","font":14,"sub_type":"normal","message":[],"post_type":"message","group_id":703195149} 

Uploading 截图 2024-02-18 14-09-13.png…

艾特消息上报错误

LLOneBot版本:2.5.0
BUG描述:
"message":[{"data":{},"type":"at"},{"data":{"text":" asdf"},"type":"text"}]

at群员上报的data为空

临时会话上报没有sender字段

和私聊没有sender是同一个情况(不过现在私聊的已经修复了
临时信息的类型是:"message_type": "others", "detail_type": "others"

回复消息上报时缺少"id"字段

回复消息上报时偶尔会缺少"data.id"字段导致Nonebot报 Error when getting message reply info: KeyError('id') 错误。
比如

    "message": [
        {
            "data": {
                "id": "xxxxxxxxxxxxx"     <--
            },
            "type": "reply"
        },
        {
            "data": {
                "text": "我不是笨蛋"
            },
            "type": "text"
        }
    ]
    "message": [
        {
            "data": {},    <--
            "type": "reply"
        },
        {
            "data": {
                "text": "我不是笨蛋"
            },
            "type": "text"
        }
    ]

可以直接用 "" 填充吗?

对接 NoneBot-Adapter-OneBot 时消息事件上报失败

在对接 NoneBot2 OneBot 适配器时,发现上报消息事件时,缺少 raw_message 和 font 两个字段,导致上报失败
在测试中,发现上报数据中,补充添加 {"raw_message": "", "font": 0},即可上报成功(不过这样的话, raw_message 的实际内容是错误的,且查看 onebot-v11 文档后,并未发现如何处理 raw_message 的相关信息,不知道作者要如何处理 raw_message,要转 cq 码吗?)

添加字段后上报成功的示例:
image

参考的文档:[onebot-v11]群消息事件数据
NoneBot2 OneBot 适配器项目地址:NoneBot2 OneBot 适配器

无法获取上报事件

QQ版本:9.9.6-19480 (64位)

LLOneBot版本:3.06

调用LLOneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):自己写的http客户端

BUG描述:
访问本机3000端口
llonebot已启动
终结点get_msg
{"status":-1,"retcode":-1,"data":null,"message":"TypeError: Cannot read properties of undefined (reading 'toString')"}
其他终结点似乎正常
访问本机8080端口(设置的上报地址)或默认地址无法访问

LLOneBot日志:全都是这个
2024/2/14 11:19:48 砰砰机器人(3542366478): 新消息事件上报失败: http://127.0.0.1:8080/ TypeError: fetch failed

[Feature] 是否有兼容go-cqhttp的需求

尽管go-cqhttp基于OneBot API开发,然而其部分包对OneBot API规定的内容有所扩展(如get_version_info这一API,go-cqhttp除了实现了OneBot API规定必须实现的app_nameapp_versionprotocol_version外,还额外添加了许多其他信息(如运行时环境参数,运行系统等))。现有的机器人插件大部分基于go-cqhttp开发,因此目前部分API由于缺少go-cqhttp独有的部分字段,而使得这些插件无法直接迁移。

想询问一下作者您是否有意向让本插件做到尽量完全兼容go-cqhttp(尽管这样会引入一些历史包袱),如果您有意向完成该工作,我可以着手先尝试对一些API做出修改(前提是开学后我这边别太忙)

3.0.6发群消息文本,返回的sub_type为friend,应该是group

QQ版本:9.9.7-20979 (64位)

LLOneBot版本:1.0.3

调用LLOneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):自写http客户端,插件形式的。

BUG描述:3.0.6发群消息文本,返回的sub_type为friend,应该是group

复现步骤:在群里发消息,看sub_type

LLOneBot日志:没有这个时间段的日志,找了,就是测试发群消息,没有这部分的日志。

无法上传mp4文件

QQ版本:9.9.7-20979

LLOneBot版本:3.6.0

调用LLOneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):Trss-yunzai

BUG描述:无法上传mp4文件

复现步骤:上传mp4文件

LLOneBot日志:

2024/2/22 14:21:53 洛箐箐(脱敏内容): 可以进行发送消息,设置发送成功回调 {}

2024/2/22 14:21:53 洛箐箐(脱敏内容): ws 消息上报 ws://localhost:2536/go-cqhttp {"status":"ok","retcode":0,"data":{"message_id":脱敏内容},"message":"","wording":"","echo":"41325f34-511a-440d-afdd-7267bdeac730"}

2024/2/22 14:21:54 洛箐箐(脱敏内容): 收到反向Websocket消息 {"action":"send_msg","params":{"group_id":脱敏内容,"message":[{"type":"video","data":{"file":"./data/rcmp4/脱敏内容/temp.mp4"}}]},"echo":"9741aad6-4896-4007-9787-2d726dffb052"}

2024/2/22 14:21:54 洛箐箐(脱敏内容): ws 消息上报 ws://localhost:2536/go-cqhttp {"status":"failed","retcode":1200,"data":null,"message":"消息体无法解析","wording":"消息体无法解析","echo":"9741aad6-4896-4007-9787-2d726dffb052"}

无法发送和接收QQ表情

QQ版本:9.9.7-21484 (64位)

LLOneBot版本:3.2.0

调用LLOneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):websocket客户端

BUG描述:QQ表情(不是emoji,type是face)发不出去,接收消息时message数组内没有表情对应的元素(会被隔过去),若消息只有一个表情就会像下面日志里一样,message为空。

复现步骤:用websocket按onebot的文档说明发送、接收带QQ表情的消息

LLOneBot日志: (以下QQ号和群号都正常,应该不影响修bug,为保护隐私均隐去,谢谢理解)
新消息事件ws上报 {"self_id":机器人qq号,"user_id":发送者qq号,"time":1708168268,"message_id":1708136861544,"real_id":"7336526847486895820","message_type":"group","sender":{"user_id":发送者qq号,"nickname":" ","card":"","role":"admin"},"raw_message":"","font":14,"sub_type":"normal","message":[{"data":{"text":"测试表情:"},"type":"text"},{"data":{"text":"这是表情后面的文字"},"type":"text"}],"post_type":"message","group_id":群号}
2024/2/17 19:11:11  (3408556564): 新消息事件HTTP上报失败: http://192.168.1.2:5000/ TypeError: fetch failed{"self_id":机器人qq号,"user_id":发送者qq号,"time":1708168268,"message_id":1708136861544,"real_id":"7336526847486895820","message_type":"group","sender":{"user_id":发送者qq号,"nickname":" ","card":"","role":"admin"},"raw_message":"","font":14,"sub_type":"normal","message":[{"data":{"text":"测试表情:"},"type":"text"},{"data":{"text":"这是表情后面的文字"},"type":"text"}],"post_type":"message","group_id":群号}

get_group_info和get_group_list的响应数据没有member_count和max_member_count

QQ版本: 9.9.7-21484 (64位)

LLOneBot版本:3.3.0

调用LLOneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):精易网页助手

BUG描述:根据 onebot11规范
https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_group_info-获取群信息
返回的响应数据该有member_count和max_member_count。没有这俩数据不符合onebot11规范。在之前的版本有这个member_count的,我都做好了调用,结果更新了版本后失效了。。。

复现步骤:http://127.0.0.1:3000/get_group_list

LLOneBot日志:不需要

v3.0.0 bug反馈

LLOneBot版本:v3.0.0

1.get_login_info 返回的nickname不对
2.接收图片消息不会自动下载了,例如下方路径并不存在图片,需要自己手动切换到界面才会下载图片
c:\Documents\Tencent Files\123456\nt_qq\nt_data\Pic\2024-02\Ori\9159f537d22d14d7ca88699464d0aa6c.png
上述2个问题旧版没问题

3.艾特群员的data依然为空
{"data":{},"type":"at"}
4.manifest.json中的version依然是2.5.0

与Websocket服务器握手时出现错误

QQ版本:Linux 3.2.5-20811

LLOneBot版本:3.1.0

调用LLOneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):ZeroBot

BUG描述:ZeroBot无法连接到WebSocket
ZeroBot日志如下

INFO[0004] [ws] 开始尝试连接到Websocket服务器: ws://127.0.0.1:11453
WARN[0004] [ws] 与Websocket服务器 ws://127.0.0.1:11453 握手时出现错误: invalid character 'W' looking for beginning of value

复现步骤:使用ZeroBot-Plugin连接WebSocket

LLOneBot日志:

2024/2/16 03:45:34 (xxxxxxxxxxx): event上报ws客户端已连接
2024/2/16 03:45:36 (xxxxxxxxxxx): event上报ws客户端已连接
2024/2/16 03:45:36 (xxxxxxxxxxx): event上报ws客户端已断开
2024/2/16 03:45:37 (xxxxxxxxxxx): event上报ws客户端已断开

preload.ts sendSendMsgResult 安全问题

如图所示,preload.tssendSendMsgResult 可被渲染端调用执行来发送任意的消息
image

安全提示来源:electron 文档进程间通信中提到的安全警告
2. 通过预加载脚本暴露 ipcRenderer.send
image

或许可以采用以下这种方式来规避这个问题?(只是个人建议)
image
图中红框部分代码:
MessageGroup.ts

const msg = await sendIPCMsgAsync<MessageElement, Data>(
    CHANNEL_HANDLE_SINGLE_MESSAGE,
    CHANNEL_BACK_SINGLE_MESSAGE,
    oriMessage
)

IPCSend.ts

export interface SendIPCMsgSession<T> {
    id: string
    data: T
}

export function sendIPCMsgAsync<T, V>(
    channelTo: string,
    channelBack: string,
    data: T
) {
    return new Promise<V>((resolve) => {
        const onceSessionId = `${channelTo}____${uuid4()}`
        const handler = (event: any, result: SendIPCMsgSession<V>) => {
            if (result.id === onceSessionId) {
                resolve(result.data)
                ipcMain.off(channelBack, handler)
                return
            }
        }
        ipcMain.on(channelBack, handler)
        sendIPCMsg(channelTo, {
            id: onceSessionId,
            data,
        })
    })
}

preload.ts

// 感觉 sendSendMsgResult 的实现不安全,因此更改了实现方式
handleSingleMessage: (callback: (session: SendIPCMsgSession<MessageElement>) => void) => {
    ipcRenderer.on(
        CHANNEL_HANDLE_SINGLE_MESSAGE, 
        (_event, value) => callback(value)
    )
},
backSingleMessage: <T>(data: T) => {
    ipcRenderer.send(
        CHANNEL_BACK_SINGLE_MESSAGE, 
        data
    )
},

无法发送私信

QQ版本:9.9.7

LLAPI版本:最新

LLOneBot版本:最新

调用LLoneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):Koishi的onebot插件

您安装LLOneBot的步骤:使用脚本安装ll,再把文件放进插件目录

BUG描述:无法发送私信
Image_1707661498774

复现步骤:布吉岛

插件似乎未生效x2

2024-01-25_00-40_1

已经检查所有issue,LLAPI为 #4 中提及的最新版本。

如图,无法正常使用API,启动log如下:
2024-01-25_00-40
像上一位 closed 的 issuer 一样使用 chrome 网络台发送请求,得到的结果也是一样的。

目录结构如下:
2024-01-25_00-48

设置信息如下:
2024-01-25_00-43

版本信息如下:
2024-01-25_00-43_1
2024-01-25_00-46

产生 log 如下:
2024-01-25_00-45

无法连接上云崽、ZeroBot-Plugin实例

QQ版本:9.9.7-20979

LLOneBot版本:3.3.1

调用LLOneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):云崽(Miao-Yunzai通过ws-plugin连接)及ZeroBot-Plugin(ws连接)

BUG描述:启用云崽、ZeroBot-Plugin时显示成功连接(见图),但云崽无任何消息进入,发送任何消息均无反应,ZeroBot-Plugin有显示报错(见第二条回复),测试mirai的overflow项目可以正常连接并接收消息。

复现步骤:无

LLOneBot日志:云崽测试时LLOneBot日志仅显示收到新消息,无消息上报及ws连接提示;ZeroBot-Plugin测试时有显示ws客户端已连接及ws消息上报
3CFB46BB82147A852B8C9B7632E44E1E
Snipaste_2024-02-20_00-46-53

调用 send_group_forward_msg 时出现错误, 返回值: 1404, 解释: bug

QQ版本:9.9.7-21484 (windows)

LLOneBot版本:3.4.0

调用LLOneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):NoneBot2(zhenxunBot)

BUG描述:bot发送合并转发消息时发生错误,导致无法正常发送;

复现步骤:用户请求多张图片 -> bot收到后开始下载 -> 全部下载完成,开始合并转发发送 -> 发送出错 -> 没有收到任何返回消息

LLOneBot日志: https://paste.ubuntu.com/p/93w9RZTZK4/

NoneBot 日志:nonebot.adapters.onebot.v11.exception.ActionFailed: ActionFailed(status='failed', retcode=1404, data=None, echo='2231', message='不支持的api send_group_forward_msg')

不能发送语音

我使用ffmpeg将mp3的音频文件转换为了mar的音频文件,发送后提示发送成功,但实际上并没有发送。
post请求http://127.0.0.1:3000/send_msg

{
    "message_type": "group",
    "group_id": 701339984,
    "message": [
        {
            "type": "record",
            "data": {
                "file": "http://127.0.0.1:8021/audio.amr"    // 注释后加的,这是我放在文件服务器上的文件地址
            }
        }
    ],
    "auto_escape": true
}

这是Bot上报的数据:

{
    "status": 200,
    "retcode": 0,
    "data": [
        {
            "type": "record",
            "data": {
                "file": "http://127.0.0.1:8021/audio.amr"
            }
        }
    ],
    "message": "发送成功"
}

除此之外我还尝试了.wav、.mp3、.silk的相关文件类型,结果都没有成功。

这是我转换的源码:

public static void transferMp3Amr(String mp3Path, String target) {
        File source = new File(path);
        try {
            if (!source.exists()) {
                throw new Exception("文件不存在!");
            }
            List<String> commend = new ArrayList<String>();
            commend.add(path + "ffmpeg.exe");
            commend.add("-y");
            commend.add("-i");
            commend.add(mp3Path);
            commend.add("-ac");
            commend.add("1");
            commend.add("-ar");
            commend.add("8000");
            commend.add(target);
            try {
                ProcessBuilder builder = new ProcessBuilder();
                builder.command(commend);
                Process p = builder.start();
                p.waitFor();
            } catch (Exception e) {
                e.printStackTrace();
            }
        } catch (Exception e) {
            System.out.println("mp3转amr异常...");
            e.printStackTrace();
        }
    }

我不太明白作者说的silk编码的amr是什么意思,所以就直接转了,如果是我转换有问题,还请指出,谢谢。

在收到带 query 的 WebSocket 请求时会卡住

QQ版本:Windows 9.9.7-21484 x64

LLOneBot版本:v3.2.0

调用LLOneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):mirai-overflow / Postman

BUG描述:overflow鉴权的时候会传递一个查询参数。

插件没设置token时:
收到无参数请求(ws://127.0.0.1:14515)可正常连接
收到任意带参数请求(ws://127.0.0.1:14515?access_token=moews://127.0.0.1:14515?wejihweuyfefw)会卡住

插件设置token后:
收到不含access_token参数的请求(ws://127.0.0.1:14515?eruif3g48)时会断开连接
收到含token的参数(ws://127.0.0.1:14515?access_token=moe&c8w7gf87ewg=32)的时候会卡住

使用Postman发送可触发此bug

无token的Postman图:

bug01

图2:

图片

overflow日志:

2024-02-16 22:34:11 I/Onebot: Overflow v2.16.0-795845b-SNAPSHOT 正在运行
2024-02-16 22:34:11 I/Onebot: 连接到 WebSocket: ws://127.0.0.1:14514
2024-02-16 22:34:11 I/Onebot: ▌ 已连接到服务器 ┈━═☆
2024-02-16 22:34:21 W/Onebot: Request failed: [get_version_info, echo=0] Timed out waiting for 10000 ms
2024-02-16 22:34:21 I/Onebot: 服务端版本信息
{
  "status": "failed",
  "retcode": -1,
  "message": "Timed out waiting for 10000 ms"
}
2024-02-16 22:34:31 W/Onebot: Request failed: [get_login_info, echo=1] Timed out waiting for 10000 ms

复现步骤:同上

LLOneBot日志:

2024/2/16 22:36:24 : received ws connect /?access_token=uidgw 
2024/2/16 22:36:24 : receive ws url token uidgw 

[Feature] 可不可以支持 Satori 协议

感谢作者制作了这个插件, 很好用
如果能够支持 Satori 协议就更好了

原因

Satori 有完整的协议文档
https://satori.chat/zh-CN or https://satori.js.org/
GitHub 源代码
相比于 Onebot 更加清晰, 更加通用

使用了 TypeScript 开发
协议中类型等常量在 @satorijs/protocol 中均有列出 https://github.com/satorijs/satori/blob/master/packages/protocol/

并且, 很多框架都支持 Satori 协议
Koishi - @koishijs/plugin-adapter-satori 上游 @satorijs/adapter-satori
Nonebot2 - nonebot-adapter-satori
Avilla - https://github.com/GraiaProject/Avilla/tree/master/avilla/satori
而 Onebot 已经被 Koishi 移入社区支持,
类似的 Chronocat 也推荐使用 Satori 协议, 而不是 Red (一个基于 Onebot 协议的扩展协议)

测试?

使用 Koishi 框架, 测试 Bot 的日常使用
使用 logirl 可以在终端中连接 Satori 以接受并显示消息

[Feature] 支持陌生人私聊消息的发送

尽管OneBot API v11规范中未做出要求,但是现在大部分框架都支持,当检测到send_private_msg这一API请求中出现group_id字样时,自动判断为从群号为group_id这个群中向QQ号为user_id的人发送陌生人私聊消息。建议支持这一额外特性,以方便机器人发起私聊消息。

用户的群昵称和昵称不一致时无法获取昵称

QQ版本:3.2.5-21357

LLOneBot版本:3.0.3

调用LLOneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):NoneBot2

BUG描述:用户的群昵称和昵称不一致时,会无法获取昵称

复现步骤:在QQ群里把群昵称改掉

LLOneBot日志:

2024/2/16 15:57:44 墨子不是猫(3380643076): 新消息事件上报成功: http://127.0.0.1:47826/onebot/v11/ {"self_id":"3380643076","user_id":"1799474509","time":1708070264,"message_id":"7336105919116575966","real_id":"7336105919116575966","message_type":"group","sender":{"user_id":"1799474509","nickname":"小猫吖库","card":"","role":"member"},"raw_message":"","font":14,"sub_type":"friend","message":[{"data":{"text":"你想你靠在我肩上我亲你一口不过分吧"},"type":"text"}],"post_type":"message","group_id":"915328909"} 
2024/2/16 15:57:47 墨子不是猫(3380643076): 收到新消息,push到历史记录 {"msgId":"7336105933166547157","msgRandom":"1410447096","msgSeq":"504386","cntSeq":"0","chatType":2,"msgType":2,"subMsgType":1,"sendType":0,"senderUid":"u_Rvrm6x7EkLufjieJIFGOOg","peerUid":"781043201","channelId":"","guildId":"","guildCode":"0","fromUid":"0","fromAppid":"0","msgTime":"1708070266","msgMeta":"0x","sendStatus":2,"sendRemarkName":"","sendMemberName":"","sendNickName":"离囚号(废物)","guildName":"","channelName":"","elements":[{"elementType":1,"elementId":"7336105933166547156","extBufForUI":"0x","textElement":{"content":"细狗😡","atType":0,"atUid":"0","atTinyId":"0","atNtUid":"","subElementType":0,"atChannelId":"0","linkInfo":null,"atRoleId":"0","atRoleColor":0,"atRoleName":"","needNotify":0},"faceElement":null,"marketFaceElement":null,"replyElement":null,"picElement":null,"pttElement":null,"videoElement":null,"grayTipElement":null,"arkElement":null,"fileElement":null,"liveGiftElement":null,"markdownElement":null,"structLongMsgElement":null,"multiForwardMsgElement":null,"giphyElement":null,"walletElement":null,"inlineKeyboardElement":null,"textGiftElement":null,"calendarElement":null,"yoloGameResultElement":null,"avRecordElement":null,"structMsgElement":null,"faceBubbleElement":null,"shareLocationElement":null,"tofuRecordElement":null,"taskTopMsgElement":null}],"records":[],"emojiLikesList":[],"commentCnt":"0","directMsgFlag":0,"directMsgMembers":[],"peerName":"可爱の艾拉❤️可塑性","freqLimitInfo":null,"editable":false,"avatarMeta":"","avatarPendant":"","feedId":"","roleId":"0","timeStamp":"0","clientIdentityInfo":null,"isImportMsg":false,"atType":0,"roleType":0,"fromChannelRoleInfo":{"roleId":"0","name":"","color":0},"fromGuildRoleInfo":{"roleId":"0","name":"","color":0},"levelRoleInfo":{"roleId":"0","name":"","color":0},"recallTime":"0","isOnlineMsg":true,"generalFlags":"0x","clientSeq":"0","fileGroupSize":null,"foldingInfo":null,"multiTransInfo":null,"senderUin":"3096390360","peerUin":"781043201","msgAttrs":{},"anonymousExtInfo":null,"nameType":0,"avatarFlag":0,"extInfoForUI":null,"personalMedal":null,"categoryManage":0} 
2024/2/16 15:57:47 墨子不是猫(3380643076): 新消息事件上报成功: http://127.0.0.1:47826/onebot/v11/ {"self_id":"3380643076","user_id":"3096390360","time":1708070266,"message_id":"7336105933166547157","real_id":"7336105933166547157","message_type":"group","sender":{"user_id":"3096390360","nickname":"离囚号(废物)","card":"","role":"admin"},"raw_message":"","font":14,"sub_type":"friend","message":[{"data":{"text":"细狗😡"},"type":"text"}],"post_type":"message","group_id":"781043201"} 
2024/2/16 15:57:51 墨子不是猫(3380643076): 收到新消息,push到历史记录 {"msgId":"7336105950764948274","msgRandom":"721831372","msgSeq":"196471","cntSeq":"0","chatType":2,"msgType":2,"subMsgType":2,"sendType":0,"senderUid":"u_qalA_QeSNy5VWDJDKpJ9og","peerUid":"849331680","channelId":"","guildId":"","guildCode":"0","fromUid":"0","fromAppid":"0","msgTime":"1708070271","msgMeta":"0x","sendStatus":2,"sendRemarkName":"","sendMemberName":"Episode","sendNickName":"","guildName":"","channelName":"","elements":[{"elementType":2,"elementId":"7336105950764948273","extBufForUI":"0x","textElement":null,"faceElement":null,"marketFaceElement":null,"replyElement":null,"picElement":{"picSubType":0,"fileName":"8980813151F6E7DE78E31369036256D9.jpg","fileSize":"47748","picWidth":962,"picHeight":550,"original":false,"md5HexStr":"8980813151f6e7de78e31369036256d9","sourcePath":"/home/yuchuxi/.config/QQ/nt_qq_66e7900397d8072e982cf55ad59ab0fa/nt_data/Pic/2024-02/Ori/8980813151f6e7de78e31369036256d9.jpg","thumbPath":{},"transferStatus":0,"progress":0,"picType":1000,"invalidState":0,"fileUuid":"3106491706","fileSubId":"","thumbFileSize":0,"fileBizId":null,"downloadIndex":null,"summary":"","emojiFrom":0,"emojiWebUrl":null,"emojiAd":{"url":"","desc":""},"emojiMall":{"packageId":0,"emojiId":0},"emojiZplan":{"actionId":0,"actionName":"","actionType":0,"playerNumber":0,"peerUid":"0","bytesReserveInfo":""},"originImageMd5":"8E300D7851B3CF2351B7D5B178E74242","originImageUrl":"/gchatpic_new/3807427761/849331680-3106491706-8980813151F6E7DE78E31369036256D9/0?term=255&is_origin=0","import_rich_media_context":null,"isFlashPic":false},"pttElement":null,"videoElement":null,"grayTipElement":null,"arkElement":null,"fileElement":null,"liveGiftElement":null,"markdownElement":null,"structLongMsgElement":null,"multiForwardMsgElement":null,"giphyElement":null,"walletElement":null,"inlineKeyboardElement":null,"textGiftElement":null,"calendarElement":null,"yoloGameResultElement":null,"avRecordElement":null,"structMsgElement":null,"faceBubbleElement":null,"shareLocationElement":null,"tofuRecordElement":null,"taskTopMsgElement":null}],"records":[],"emojiLikesList":[],"commentCnt":"0","directMsgFlag":0,"directMsgMembers":[],"peerName":"米綾幼儿园🍭","freqLimitInfo":null,"editable":false,"avatarMeta":"","avatarPendant":"","feedId":"","roleId":"0","timeStamp":"0","clientIdentityInfo":null,"isImportMsg":false,"atType":0,"roleType":0,"fromChannelRoleInfo":{"roleId":"0","name":"","color":0},"fromGuildRoleInfo":{"roleId":"0","name":"","color":0},"levelRoleInfo":{"roleId":"0","name":"","color":0},"recallTime":"0","isOnlineMsg":true,"generalFlags":"0x","clientSeq":"0","fileGroupSize":null,"foldingInfo":null,"multiTransInfo":null,"senderUin":"3807427761","peerUin":"849331680","msgAttrs":{},"anonymousExtInfo":null,"nameType":0,"avatarFlag":0,"extInfoForUI":null,"personalMedal":null,"categoryManage":0} 
2024/2/16 15:57:51 墨子不是猫(3380643076): 新消息事件上报成功: http://127.0.0.1:47826/onebot/v11/ {"self_id":"3380643076","user_id":"3807427761","time":1708070271,"message_id":"7336105950764948274","real_id":"7336105950764948274","message_type":"group","sender":{"user_id":"3807427761","nickname":"","card":"Episode","role":"member"},"raw_message":"","font":14,"sub_type":"friend","message":[{"data":{"file_id":"3106491706","path":"/home/yuchuxi/.config/QQ/nt_qq_66e7900397d8072e982cf55ad59ab0fa/nt_data/Pic/2024-02/Ori/8980813151f6e7de78e31369036256d9.jpg","file":"file:///home/yuchuxi/.config/QQ/nt_qq_66e7900397d8072e982cf55ad59ab0fa/nt_data/Pic/2024-02/Ori/8980813151f6e7de78e31369036256d9.jpg"},"type":"image"}],"post_type":"message","group_id":"849331680"} 
2024/2/16 15:57:52 墨子不是猫(3380643076): 收到新消息,push到历史记录 {"msgId":"7336105954553155346","msgRandom":"542732607","msgSeq":"317046","cntSeq":"0","chatType":2,"msgType":9,"subMsgType":33,"sendType":0,"senderUid":"u_ZFTcBsllLmx-8A20mqfYDg","peerUid":"812766886","channelId":"","guildId":"","guildCode":"0","fromUid":"0","fromAppid":"0","msgTime":"1708070271","msgMeta":"0x","sendStatus":2,"sendRemarkName":"","sendMemberName":"正经图吧小白","sendNickName":"","guildName":"","channelName":"","elements":[{"elementType":7,"elementId":"7336105954553155335","extBufForUI":"0x","textElement":null,"faceElement":null,"marketFaceElement":null,"replyElement":{"replayMsgId":"0","replayMsgSeq":"317044","replayMsgRootSeq":"317044","replayMsgRootMsgId":"0","replayMsgRootCommentCnt":"0","sourceMsgIdInRecords":"7336105954553155345","sourceMsgText":"","sourceMsgTextElems":[{"replyAbsElemType":1,"textElemContent":"魔兽还能玩吗","faceElem":null}],"senderUid":"568730839","senderUidStr":"u_qrbmaxFka9tYvZMoM-WkSg","replyMsgClientSeq":"0","replyMsgTime":"1708070146","replyMsgRevokeType":0,"sourceMsgIsIncPic":false,"sourceMsgExpired":false,"anonymousNickName":null,"originalMsgState":null},"picElement":null,"pttElement":null,"videoElement":null,"grayTipElement":null,"arkElement":null,"fileElement":null,"liveGiftElement":null,"markdownElement":null,"structLongMsgElement":null,"multiForwardMsgElement":null,"giphyElement":null,"walletElement":null,"inlineKeyboardElement":null,"textGiftElement":null,"calendarElement":null,"yoloGameResultElement":null,"avRecordElement":null,"structMsgElement":null,"faceBubbleElement":null,"shareLocationElement":null,"tofuRecordElement":null,"taskTopMsgElement":null},{"elementType":1,"elementId":"7336105954553155340","extBufForUI":"0x","textElement":{"content":"@凡人","atType":2,"atUid":"0","atTinyId":"0","atNtUid":"u_qrbmaxFka9tYvZMoM-WkSg","subElementType":0,"atChannelId":"0","linkInfo":null,"atRoleId":"0","atRoleColor":0,"atRoleName":"","needNotify":0},"faceElement":null,"marketFaceElement":null,"replyElement":null,"picElement":null,"pttElement":null,"videoElement":null,"grayTipElement":null,"arkElement":null,"fileElement":null,"liveGiftElement":null,"markdownElement":null,"structLongMsgElement":null,"multiForwardMsgElement":null,"giphyElement":null,"walletElement":null,"inlineKeyboardElement":null,"textGiftElement":null,"calendarElement":null,"yoloGameResultElement":null,"avRecordElement":null,"structMsgElement":null,"faceBubbleElement":null,"shareLocationElement":null,"tofuRecordElement":null,"taskTopMsgElement":null},{"elementType":1,"elementId":"7336105954553155341","extBufForUI":"0x","textElement":{"content":" 能","atType":0,"atUid":"0","atTinyId":"0","atNtUid":"","subElementType":0,"atChannelId":"0","linkInfo":null,"atRoleId":"0","atRoleColor":0,"atRoleName":"","needNotify":0},"faceElement":null,"marketFaceElement":null,"replyElement":null,"picElement":null,"pttElement":null,"videoElement":null,"grayTipElement":null,"arkElement":null,"fileElement":null,"liveGiftElement":null,"markdownElement":null,"structLongMsgElement":null,"multiForwardMsgElement":null,"giphyElement":null,"walletElement":null,"inlineKeyboardElement":null,"textGiftElement":null,"calendarElement":null,"yoloGameResultElement":null,"avRecordElement":null,"structMsgElement":null,"faceBubbleElement":null,"shareLocationElement":null,"tofuRecordElement":null,"taskTopMsgElement":null}],"records":[{"msgId":"7336105954553155345","msgRandom":"0","msgSeq":"317044","cntSeq":"0","chatType":2,"msgType":2,"subMsgType":1,"sendType":0,"senderUid":"u_qrbmaxFka9tYvZMoM-WkSg","peerUid":"812766886","channelId":"","guildId":"","guildCode":"0","fromUid":"0","fromAppid":"0","msgTime":"1708070146","msgMeta":"0x","sendStatus":2,"sendRemarkName":"","sendMemberName":"","sendNickName":"凡人","guildName":"","channelName":"","elements":[{"elementType":1,"elementId":"7336105954553155344","extBufForUI":"0x","textElement":{"content":"魔兽还能玩吗","atType":0,"atUid":"0","atTinyId":"0","atNtUid":"","subElementType":0,"atChannelId":"0","linkInfo":null,"atRoleId":"0","atRoleColor":0,"atRoleName":"","needNotify":0},"faceElement":null,"marketFaceElement":null,"replyElement":null,"picElement":null,"pttElement":null,"videoElement":null,"grayTipElement":null,"arkElement":null,"fileElement":null,"liveGiftElement":null,"markdownElement":null,"structLongMsgElement":null,"multiForwardMsgElement":null,"giphyElement":null,"walletElement":null,"inlineKeyboardElement":null,"textGiftElement":null,"calendarElement":null,"yoloGameResultElement":null,"avRecordElement":null,"structMsgElement":null,"faceBubbleElement":null,"shareLocationElement":null,"tofuRecordElement":null,"taskTopMsgElement":null}],"records":[],"emojiLikesList":[],"commentCnt":"0","directMsgFlag":0,"directMsgMembers":[],"peerName":"纯洁垃圾佬硬件交流群","freqLimitInfo":null,"editable":false,"avatarMeta":"","avatarPendant":"","feedId":"","roleId":"0","timeStamp":"0","clientIdentityInfo":null,"isImportMsg":false,"atType":0,"roleType":0,"fromChannelRoleInfo":{"roleId":"0","name":"","color":0},"fromGuildRoleInfo":{"roleId":"0","name":"","color":0},"levelRoleInfo":{"roleId":"0","name":"","color":0},"recallTime":"0","isOnlineMsg":false,"generalFlags":"0x","clientSeq":"0","fileGroupSize":null,"foldingInfo":null,"multiTransInfo":null,"senderUin":"568730839","peerUin":"812766886","msgAttrs":{},"anonymousExtInfo":null,"nameType":0,"avatarFlag":0,"extInfoForUI":null,"personalMedal":null,"categoryManage":0}],"emojiLikesList":[],"commentCnt":"0","directMsgFlag":0,"directMsgMembers":[],"peerName":"纯洁垃圾佬硬件交流群","freqLimitInfo":null,"editable":false,"avatarMeta":"","avatarPendant":"","feedId":"","roleId":"0","timeStamp":"0","clientIdentityInfo":null,"isImportMsg":false,"atType":2,"roleType":0,"fromChannelRoleInfo":{"roleId":"0","name":"","color":0},"fromGuildRoleInfo":{"roleId":"0","name":"","color":0},"levelRoleInfo":{"roleId":"0","name":"","color":0},"recallTime":"0","isOnlineMsg":true,"generalFlags":"0x","clientSeq":"0","fileGroupSize":null,"foldingInfo":null,"multiTransInfo":null,"senderUin":"3511517520","peerUin":"812766886","msgAttrs":{},"anonymousExtInfo":null,"nameType":0,"avatarFlag":0,"extInfoForUI":null,"personalMedal":null,"categoryManage":0} 
2024/2/16 15:57:52 墨子不是猫(3380643076): 新消息事件上报成功: http://127.0.0.1:47826/onebot/v11/ {"self_id":"3380643076","user_id":"3511517520","time":1708070271,"message_id":"7336105954553155346","real_id":"7336105954553155346","message_type":"group","sender":{"user_id":"3511517520","nickname":"","card":"正经图吧小白","role":"member"},"raw_message":"","font":14,"sub_type":"friend","message":[{"data":{"id":"7336105413472809453"},"type":"reply"},{"data":{"mention":"568730839","qq":"568730839"},"type":"at"},{"data":{"text":" 能"},"type":"text"}],"post_type":"message","group_id":"812766886"} 

插件似乎未生效,无法发送消息

安装插件后,按照示例发送请求,返回 connect ECONNREFUSED
image
似乎和 LiteLoaderQQNT-Plugin-LLAPI 未启用有关系
配置:
image

用命令行启动 qq 后的日志:
D:\Program Files\Tencent\QQNT>qq.exe

D:\Program Files\Tencent\QQNT>not mini app.
[app]module file name: D:\Program Files\Tencent\QQNT\QQ.exe
7769277bc358f63dc786c6697c1daaef9b844c4a99d3d74a187e902cc817485e
2a48aa9afca3e84d2930d5fed18084d9132cddcb3921a326c572ef2bc2e7f96e
643a4a860c15c91827bf0f2a77510172a980fc5d3a18ef73ffec757ec3086463
c651b4bfa083cf6aebe2104226131a9dd351d0fd56d4863504bfa7d9f6d5071f
0
[preload] process type:
[app]module file name: D:\Program Files\Tencent\QQNT\QQ.exe
[preload] hotupdate base version: 9.9.6-19689
[preload] hotupdate current version: 9.9.6-20139
[preload] install app version: 9.9.6-19689

[preload] succeeded. D:\Program Files\Tencent\QQNT\resources\app\versions\9.9.6-20139\wrapper.node
[preload] succeeded. D:\Program Files\Tencent\QQNT\resources\app\versions\9.9.6-20139\major.node
[preload] succeeded. D:\Program Files\Tencent\QQNT\resources\app\app_launcher\launcher.node
[LiteLoader] Start finding all plugins.
[LiteLoader] Found plugin: LLOneBot
[LiteLoader] Found 1 plugins, start loading plugins.
[preload] register done. launcher.node
[preload] register done. major.node
[preload] register done. wrapper.node
14:07:13.046 > [hot update] hotUpdateApi checkHasMultipleQQ false
14:07:13.050 > [hot update] hotUpdateApi start clearOldVersions
14:07:13.051 > [hot update] hotUpdateApi curVersionZipPath is: D:\Program Files\Tencent\QQNT\resources\app\versions\9.9.6-20139.zip false
14:07:13.117 > [hot update] hotUpdateApi checkHasMultipleQQ false
14:07:13.119 > [hot update] hotUpdateApi checkIsOnErrorVersion 9.9.7-20811
14:07:13.121 > [hot update] hotUpdateApi checkIsOnErrorVersion res is false
14:07:13.186 > [hot update] hotUpdateApi cancel
14:07:13.187 > [hot update] onStatusChanged IDLE
14:07:13.189 > [hot update] onUpdateCancel

无法连接mirai overflow,请求支持 get_version_info API

QQ版本:Windows 9.9.7-21484 x64

LLOneBot版本:v3.1.2

调用LLOneBot的方式或者应用端(如postman直接调用,或NoneBot2、Koishi):mirai-overflow

BUG描述:插件开启正向ws服务器,尝试用mirai overflow连接失败。阅读log发现overflow在向插件发送未支持的get_version_info

下面附上overflow日志:

2024-02-16 17:47:37 I/Onebot: Overflow v2.16.0-c7971b9-SNAPSHOT 正在运行
2024-02-16 17:47:37 I/Onebot: 连接到 WebSocket: ws://127.0.0.1:14514
2024-02-16 17:47:37 I/Onebot: ▌ 已连接到服务器 ┈━═☆
2024-02-16 17:47:37 W/stderr: Exception in thread "DefaultDispatcher-worker-1" java.lang.NullPointerException
2024-02-16 17:47:37 W/stderr:   at cn.evolvefield.onebot.client.util.ListenerUtils.getMessageType(ListenerUtils.kt:51)
2024-02-16 17:47:37 W/stderr:   at cn.evolvefield.onebot.client.util.ListenerUtils.getMessageType(ListenerUtils.kt:15)
2024-02-16 17:47:37 W/stderr:   at cn.evolvefield.onebot.client.handler.EventBus.onReceive(EventBus.kt:39)
2024-02-16 17:47:37 W/stderr:   at cn.evolvefield.onebot.client.connection.WSClient$onMessage$1.invokeSuspend(WSClient.kt:65)
2024-02-16 17:47:37 W/stderr:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2024-02-16 17:47:37 W/stderr:   at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2024-02-16 17:47:37 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
2024-02-16 17:47:37 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
2024-02-16 17:47:37 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
2024-02-16 17:47:37 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
2024-02-16 17:47:37 W/stderr:   Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [CoroutineName(overflow), StandaloneCoroutine{Cancelling}@12a195b3, Dispatchers.Default]
2024-02-16 17:47:47 W/Onebot: Request failed: [get_version_info, echo=0] Timed out waiting for 10000 ms
2024-02-16 17:47:47 I/Onebot: 服务端版本信息
{
  "status": "failed",
  "retcode": -1,
  "message": "Timed out waiting for 10000 ms"
}
2024-02-16 17:47:47 W/stderr: Exception in thread "DefaultDispatcher-worker-1" java.lang.NullPointerException
2024-02-16 17:47:47 W/stderr:   at cn.evolvefield.onebot.client.util.ListenerUtils.getMessageType(ListenerUtils.kt:51)
2024-02-16 17:47:47 W/stderr:   at cn.evolvefield.onebot.client.util.ListenerUtils.getMessageType(ListenerUtils.kt:15)
2024-02-16 17:47:47 W/stderr:   at cn.evolvefield.onebot.client.handler.EventBus.onReceive(EventBus.kt:39)
2024-02-16 17:47:47 W/stderr:   at cn.evolvefield.onebot.client.connection.WSClient$onMessage$1.invokeSuspend(WSClient.kt:65)
2024-02-16 17:47:47 W/stderr:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2024-02-16 17:47:47 W/stderr:   at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2024-02-16 17:47:47 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
2024-02-16 17:47:47 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
2024-02-16 17:47:47 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
2024-02-16 17:47:47 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
2024-02-16 17:47:47 W/stderr:   Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [CoroutineName(overflow), StandaloneCoroutine{Cancelling}@41ea15aa, Dispatchers.Default]
2024-02-16 17:47:57 W/Onebot: Request failed: [get_login_info, echo=1] Timed out waiting for 10000 ms
2024-02-16 17:47:57 E/main: Failed to init MiraiConsole.
java.lang.NullPointerException: Cannot read field "userId" because "it.data" is null
        at cn.evolvefield.onebot.client.core.Bot.getLoginInfo(Bot.kt:586)
        at cn.evolvefield.onebot.client.core.Bot$getLoginInfo$1.invokeSuspend(Bot.kt)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
        at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
        at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
        at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
        at top.mrxiaom.overflow.internal.plugin.OverflowCoreAsPlugin$TheLoader.enable(OverflowCoreAsPlugin.kt:156)
        at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:173)
        at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:193)
        at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:360)
        at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:512)
        at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:182)
        at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:181)
        at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:59)`

复现步骤: 使用 overflow / (github) 连接插件

LLOneBot日志:

2024/2/16 17:47:37 BOT(x): event上报ws客户端已连接 
2024/2/16 17:47:37 BOT(x): 收到ws消息 {"action":"get_version_info","echo":0} 
2024/2/16 17:47:47 BOT(x): 收到ws消息 {"action":"get_login_info","echo":1} 
2024/2/16 17:47:59 BOT(x): event上报ws客户端已断开 

另外,有机会支持一下鉴权吗,感觉这样会安全一些(

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.