only52607 / lua-mirai

Mirai机器人的lua扩展支持
https://only52607.github.io/lua-mirai/
GNU Affero General Public License v3.0
126 stars 28 forks source link

转发消息 的Bug #43

Closed kjundada closed 2 years ago

kjundada commented 3 years ago

在文档里面写到

Forward { -- 可省略括号
    title = "群聊的聊天记录",
    brief = "[聊天记录]",
    source = "聊天记录",
    preview = { 
        "消息概览1",
        "消息概览2"
    }, -- 可省略
    summary = "查看 1 条转发消息" -- 可省略,
    content = {
        {
            senderId = 123456789, -- 发送者 qq 号
            time = 987654, -- 发送的时间戳
            senderName = "发送者昵称1",
            message = Message("消息1") .. Face(0) -- 显示的消息内容
        },
        {
            senderId = 123456789, 
            time = 987654,
            senderName = "发送者昵称2",
            message = Message("消息2") .. Face(0) -- 显示的消息内容
        },
    }
}

会报错

2020-11-03 13:27:06 E/Bot 1654723334: An exception was thrown under a coroutine of Bot
org.luaj.vm2.LuaError: @aio.lua:339 attempt to call nil

如果按照event.group:sendMessage()则会报错

2020-11-03 18:56:57 E/Bot 1654723334: An exception was thrown under a coroutine of Bot
org.luaj.vm2.LuaError: @aio.lua:327 vm error: java.lang.IllegalArgumentException: Forward nodeList mustn't be empty

请修复这个bug并更新文档,TKS

only52607 commented 2 years ago

2.4.0-alpha.1版本已解决