maimaiDX
maimaiDX copied to clipboard
使用shamrock连接hoshino时使用本插件无法发送帮助图
如图,当触发指令时无法发送帮助图片,但其他图片(如b50,单曲成绩可以正常发送)
shamrock报错如下
[12:46:41] ERROR java.io.FileNotFoundException: /home/yuyue/HoshinoBot/hoshino/modules/maimaiDX/maimaidxhelp.png: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:575)
at java.io.FileInputStream.<init>(FileInputStream.java:160)
at moe.fuqiuluo.shamrock.utils.FileUtils.parseAndSave(FileUtils.kt:38)
at moe.fuqiuluo.qqinterface.servlet.msg.maker.NtMsgElementMaker.createImageElem-yxL6bBk(NtMsgElementMaker.kt:1008)
at moe.fuqiuluo.qqinterface.servlet.msg.maker.NtMsgElementMaker.access$createImageElem-yxL6bBk(NtMsgElementMaker.kt:63)
at moe.fuqiuluo.qqinterface.servlet.msg.maker.NtMsgElementMaker$makerMap$4.invoke-yxL6bBk(NtMsgElementMaker.kt:68)
at moe.fuqiuluo.qqinterface.servlet.msg.maker.NtMsgElementMaker$makerMap$4.invoke(NtMsgElementMaker.kt:68)
at moe.fuqiuluo.shamrock.helper.MessageHelper.messageArrayToMsgElements(MessageHelper.kt:299)
at moe.fuqiuluo.shamrock.helper.MessageHelper.sendMessageWithoutMsgId-hUnOzRk(MessageHelper.kt:93)
at moe.fuqiuluo.qqinterface.servlet.MsgSvc.sendToAio-hUnOzRk(MsgSvc.kt:213)
at moe.fuqiuluo.shamrock.remote.action.handlers.SendMessage.invoke(SendMessage.kt:167)
at moe.fuqiuluo.shamrock.remote.action.handlers.SendMessage.internalHandle(SendMessage.kt:78)
at moe.fuqiuluo.shamrock.remote.action.IActionHandler.handle(ActionManager.kt:36)
at moe.fuqiuluo.shamrock.remote.service.api.WebSocketClientServlet.handleMessage(WebSocketClientServlet.kt:72)
at moe.fuqiuluo.shamrock.remote.service.api.WebSocketClientServlet.access$handleMessage(WebSocketClientServlet.kt:36)
at moe.fuqiuluo.shamrock.remote.service.api.WebSocketClientServlet$onMessage$1.invokeSuspend(WebSocketClientServlet.kt:55)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
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)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:567)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:273)
at libcore.io.ForwardingOs.open(ForwardingOs.java:567)
at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7756)
at libcore.io.IoBridge.open(IoBridge.java:561)
... 23 more
由于shamrock的连接方式不同于gocqhttp(即消息处理端和消息发送端不在同一设备),导致shamrock误以为代码中写死的消息处理端文件路径是消息发送端中的文件路径,因为读取不到图片文件所以导致图片发送失败