Coder Social home page Coder Social logo

lain-plugin's Introduction

哼!不写了!让你们念!!!

Visitor Count

Zyy955 GitHub stats

Top Langs

lain-plugin's People

Contributors

1150260034 avatar batvbs avatar dependabot[bot] avatar ikechan8370 avatar lava081 avatar xasyer avatar zyy955 avatar

Stargazers

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

Watchers

 avatar

lain-plugin's Issues

Shamrock合并转发消息发送报错

image
在涉及合并转发的功能时,发送消息都会失败,上图是我用#刷新ck 命令后的报错

Shamrock 1.0.8.r309.27b4c26
最新版本的Lain插件
QQ版本9.0.15

Shamrock语音视频测试。回:该消息类型暂不支持查看

该消息类型暂不支持查看

Screenshot_2023-11-03-04-20-34-17_e9df68518e6a1ad3b48efd890143f295.jpg

Screenshot_2023-11-03-04-21-57-91_e9df68518e6a1ad3b48efd890143f295.jpg

Screenshot_2023-11-03-04-22-07-84_e9df68518e6a1ad3b48efd890143f295.jpg

语音报错复制
04:19:18] ERROR java.io.FileNotFoundException: 目标文件不存在
at moe.fuqiuluo.shamrock.utils.MD5.genFileMd5Hex(Native Method)
at moe.fuqiuluo.qqinterface.servlet.transfile.FileTransfer.transTroopResource(FileTransfer.kt:62)
at moe.fuqiuluo.qqinterface.servlet.transfile.Transfer.uploadGroupVoice(Transfer.kt:75)
at moe.fuqiuluo.qqinterface.servlet.transfile.Transfer.uploadGroupVoice$default(Transfer.kt:70)
at moe.fuqiuluo.qqinterface.servlet.transfile.Transfer$ROUTE$2.invokeSuspend(Transfer.kt:14)
at moe.fuqiuluo.qqinterface.servlet.transfile.Transfer$ROUTE$2.invoke(Unknown Source:11)
at moe.fuqiuluo.qqinterface.servlet.transfile.Transfer$ROUTE$2.invoke(Unknown Source:6)
at moe.fuqiuluo.qqinterface.servlet.transfile.TransferKt.trans(Transfer.kt:115)
at moe.fuqiuluo.qqinterface.servlet.msg.MessageMaker.createRecordElem-yxL6bBk(MessageMaker.kt:583)
at moe.fuqiuluo.qqinterface.servlet.msg.MessageMaker.access$createRecordElem-yxL6bBk(MessageMaker.kt:73)
at moe.fuqiuluo.qqinterface.servlet.msg.MessageMaker$createRecordElem$1.invokeSuspend(Unknown Source:19)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32)
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:108)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

Screenshot_2023-11-03-04-25-13-47_9d26c6446fd7bb8e41d99b6262b17def.jpg

Screenshot_2023-11-03-04-25-20-03_9d26c6446fd7bb8e41d99b6262b17def.jpg

bug(可能):锅巴回复的登录指令有报错,无法正常返回信息内容

这个问题好像不是很严重,除了需要锅巴的时候才会卡一下,倒也不着急处理

复现方法:使用锅巴登录指令时候返回登录地址时候会出现此报错,疑似也是回复信息的问题

以下为报错结果:
[MiaoYz][13:00:45.616][ERRO] 发送消息错误:[{"test":true,"message":[{"type":"node","data":{"id":1748522185}},{"type":"node","data":{"id":1461156430}},{"type":"node","data":{"id":538166287}},{"type":"node","data":{"id":1723854111}}],"data":{"type":"test","text":"forward","app":"com.tencent.multimsg","meta":{"detail":{"news":[{"text":"1"}]}...
[MiaoYz][13:00:45.616][ERRO] TypeError: Cannot read properties of undefined (reading 'msg')
at Object.array (file:///root/TRSS_AllBot/Miao-Yunzai/plugins/Lain-plugin/lib/common/common.js:142:44)
at Shamrock.getShamrock (file:///root/TRSS_AllBot/Miao-Yunzai/plugins/Lain-plugin/adapter/shamrock/index.js:1220:19)
at Shamrock.sendReplyMsg (file:///root/TRSS_AllBot/Miao-Yunzai/plugins/Lain-plugin/adapter/shamrock/index.js:1183:53)
at ICQQEvent.e.reply [as replyNew] (file:///root/TRSS_AllBot/Miao-Yunzai/plugins/Lain-plugin/adapter/shamrock/index.js:894:48)
at e.reply (file:///root/TRSS_AllBot/Miao-Yunzai/lib/plugins/loader.js:532:28)
at e.reply (file:///root/TRSS_AllBot/Miao-Yunzai/plugins/yunzai-c-v-plugin/apps/%E6%B6%88%E6%81%AF%E9%A3%8E%E6%8E%A7%E5%A4%84%E7%90%86.js:31:23)
at GuobaLogin.reply (file:///root/TRSS_AllBot/Miao-Yunzai/lib/plugins/plugin.js:71:19)
at GuobaLogin.login (file:///root/TRSS_AllBot/Miao-Yunzai/plugins/Guoba-Plugin/apps/login.js?1708463698572:62:17)
at async PluginsLoader.deal (file:///root/TRSS_AllBot/Miao-Yunzai/lib/plugins/loader.js:292:52)
[MiaoYz][13:00:45.619][ERRO] [锅巴登录][login]
[MiaoYz][13:00:45.619][ERRO] undefined

Shamrock 版本: 1.0.8.r320.2c8094c
lain-plugin 版本:1.4.5(2024-02-20更新版本)
系统版本:Flyme 10.24.1.15 Daily
Android 版本: 13.0(1682851189)
LSPosed 框架版本: 1.9.2(7024)
设备的制造商和型号: MEIZU 18
设备的 CPU 架构: Snapdragon 888 (Lahaina)

QQ机器人代理问题

由于QQ机器人需要设置ip白名单,我本地的香橙派没有公网ip,因此使用vps的ip作为代理,但设置全局代理后,会报如下的错:

[ERROR] createSession:  AxiosError: Client network socket disconnected before secure TLS connection was established
    at AxiosError.from (/home/orangepi/github/yz/Miao-Yunzai/node_modules/.pnpm/[email protected]/node_modules/axios/dist/node/axios.cjs:837:14)
    at RedirectableRequest.handleRequestError (/home/orangepi/github/yz/Miao-Yunzai/node_modules/.pnpm/[email protected]/node_modules/axios/dist/node/axios.cjs:3087:25)
    at RedirectableRequest.emit (node:events:513:28)
    at eventHandlers.<computed> (/home/orangepi/github/yz/Miao-Yunzai/node_modules/.pnpm/[email protected][email protected]/node_modules/follow-redirects/index.js:38:24)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:502:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
    at Axios.request (/home/orangepi/github/yz/Miao-Yunzai/node_modules/.pnpm/[email protected]/node_modules/axios/dist/node/axios.cjs:3877:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  localAddress: undefined,
  port: '7890',
  host: '127.0.0.1',

这里看起来是代理的问题,但我做了相关尝试认为不是,因为

curl --location 'https://bots.qq.com/app/getAppAccessToken' ***
curl --location 'https://api.sgroup.qq.com/users/@me' ***

这些接口都是能成功返回的,关闭代理显示ip不在白名单,开启能成功获取token和user信息

做了相关的搜索之后,感觉这一篇文章比较符合我的情况:
https://segmentfault.com/a/1190000039412894
我怀疑是这里请求的时候检测到了本地的代理,导致直接报错了

但由于我不是很懂前端,没能找到类似的方法添加这个参数,希望能解决代理问题或者给我指指路

Ubuntu docker环境 喵崽lain启动失败

报错内容:
[MiaoYz][15:19:50.403][ERRO] 载入插件错误:lain-plugin
[MiaoYz][15:19:50.404][ERRO] Error: ENOENT: no such file or directory, open './plugins/Lain-plugin/package.json'
at Object.readFileSync (node:fs:456:20)
at file:///root/TRSS_AllBot/Miao-Yunzai/plugins/lain-plugin/model/config.js:9:32
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
at async PluginsLoader.load (file:///root/TRSS_AllBot/Miao-Yunzai/lib/plugins/loader.js:61:19)
at async Yunzai.skip_login (file:///root/TRSS_AllBot/Miao-Yunzai/lib/bot.js:37:12)
at async Yunzai.run (file:///root/TRSS_AllBot/Miao-Yunzai/lib/bot.js:19:36)
at async file:///root/TRSS_AllBot/Miao-Yunzai/app.js:3:1

硬件:树莓派5-8GB
安装使用的TRSS脚本完成,docker环境下异常,但是Tmoe环境运行正常,不确定是什么原因,发出来大佬帮忙看看

大佬,我这是什么问题?

没有你所说的config.yaml文件,并且这个命令说格式错误,改了token.yaml文件,只有频道可以“/”,而群聊还是得用“#”,我机器人是全域的
Screenshot_2024-02-02-04-36-00-110_com microsoft emmx-edit

IMG_20240202_043741

Image_1706819684439
IMG_20240202_055818

优化`Shamrock`适配器

  • at
  • face
  • reply
  • image
  • record
  • video
  • file
  • forward
  • json
  • xml
  • basketball
  • new_rps
  • new_dice
  • dice
  • rps
  • poke
  • touch
  • music
  • custom
  • weather
  • location
  • share
  • gift
  • e.message
  • e.toString
  • e.raw_message
  • e.source
  • e.file

关于群友at其他人却触发bot的问题

今天修复的这个bug感觉挺有意思的,可以做到chatgpt-plugin的ai随机回复群内群友,可以当作一个功能来实现吗,这样就可以当作 实现了ai自主回复其他人的表象55,感觉我的bot活起来了😭imageimage

大佬有没有计划做discord的适配?

现在好像只有TRSS自带了discord支持,但是又不想为了discord再额外运行一个trss云崽。如果喵崽也能支持discord就好了,大佬有没有计划增加一个discord的适配?

QQ频道机器人正常运行一段时间后会报错check guild auth not pass

机器人在沙箱频道中运行,已给予所需要的权限,正常运行一段时间后会报错
[15:13:29.632][ERRO] �[37m[test] �[39mBot无法在频道 xxx 中读取基础信息,请给予权限...错误信息:miss user id
[15:26:00.383][ERRO] {
message: 'check guild auth not pass',
code: 11264,
traceid: 'c2c72cbb4a747f272e24486b9a41ec9e'
}
[13:05:42.335][ERRO] {
message: 'check guild auth not pass',
code: 11264,
traceid: '3778288f41a70014a460128fa789dcd3'
}
[11:15:06.444][ERRO] puppeteer Chromium 缓存的实例已关闭

使用最新版的插件+Shamrock无法接收信息

只要接收到信息,就报错,回退到上一个提交的版本就没事,日志:
[MiaoYz][19:39:50.022][INFO] [���(botqq)] Shamrock加载资源成功:加载了7个好友,3个群。
[MiaoYz][19:39:53.721][ERRO] TypeError: Cannot read properties of undefined (reading 'trim')
at file:///C:/Users/lulu/Desktop/robot/Miao-Yunzai/plugins/reset-qianyu-plugin/component/icqq/Event/message.js:22:31
at Array.forEach ()
at messageEvent.dealUrl (file:///C:/Users/lulu/Desktop/robot/Miao-Yunzai/plugins/reset-qianyu-plugin/component/icqq/Event/message.js:20:
17)
at messageEvent.execute (file:///C:/Users/lulu/Desktop/robot/Miao-Yunzai/plugins/reset-qianyu-plugin/component/icqq/Event/message.js:12:
10)
at Yunzai. (file:///C:/Users/lulu/Desktop/robot/Miao-Yunzai/plugins/reset-qianyu-plugin/component/icqq/EventListener.js:51:91
)
at Yunzai.trip (C:\Users\lulu\Desktop\robot\Miao-Yunzai\node_modules.pnpm\[email protected]\node_modules\triptrap\lib\index.js:75:22)
at Yunzai.emit (C:\Users\lulu\Desktop\robot\Miao-Yunzai\node_modules.pnpm\[email protected]\node_modules\icqq\lib\core\base-client.js:245:21)
at Shamrock.message (file:///C:/Users/lulu/Desktop/robot/Miao-Yunzai/plugins/Lain-plugin/adapter/shamrock/index.js:67:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

[MCSMANAGER] [INFO] 已执行预设的关闭命令:^c

TODO

  • QQ频道Bot缺失guilds
  • QQ频道Bot缺失pickMember
  • QQ频道Bot缺失pickUser
  • QQ频道Bot缺失pickFriend
  • QQ频道Bot缺失pickGroup
  • QQ频道Bot缺失setEssenceMessage
  • QQ频道Bot缺失sendPrivateMsg
  • QQ频道Bot缺失getGroupMemberInfo
  • QQ频道Bot缺失removeEssenceMessage
  • QQ频道Bot缺失makeForwardMsg
  • QQ频道Bot缺失getMsg
  • QQ频道 重构被动消息传入方式为{type: reply, id: msg_id }
  • 重构标准输入
  • 重构PC微信部分逻辑
  • 重构QQBotapi部分
  • 重构配置文件,分离每个适配器
  • 从插件方再实现一次loader.js,用于更方便的管理每个适配器的各项功能。
  • 统一渲染方法
  • 通用参数重构
  • resources文件夹调整
  • 锅巴重构

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.