• Q&A
  • 【求助】reply的报错

.reply 来点二次元 [CQ:image,id=https://acg.toubiec.cn/random.php]

来点二次元

2022-02-16 15:32:36 E/MiraiNative: Exception in coroutine Plugin MiraiNative of
MiraiNative
java.lang.IllegalArgumentException: message is empty
at net.mamoe.mirai.internal.contact.GroupImpl.sendMessage(GroupImpl.kt:1
61)
at org.itxtech.mirainative.bridge.MiraiBridge$sendGroupMessage$1$1.invok
eSuspend(MiraiBridge.kt:150)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Contin
uationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineS
cheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(C
oroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(Cor
outineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Coroutine
Scheduler.kt:665)

  • fy678 觉得很赞
  • 您还可以尝试编写Lua插件,写入类似代码
    msg_order={}
    function test()
    return "[CQ:image,url=https://acg.toubiec.cn/random.php]"
    end
    msg_order["来点二次元"]="test"

    放入plugin文件夹后输入.system load即可

这个API似乎是通过跳转图片的方式实现的。
Reply取得是不能用跳转的。
你可以找一个直接返回图片的API

您还可以尝试编写Lua插件,写入类似代码
msg_order={}
function test()
return "[CQ:image,url=https://acg.toubiec.cn/random.php]"
end
msg_order["来点二次元"]="test"

放入plugin文件夹后输入.system load即可

说点什么吧...