KLG-Software-Development / klbot

Multi-function bot via mirai
0 stars 0 forks source link

NapCat似乎缺少对非扁平消息数组的支持,需规避 #187

Open Deleeete opened 5 months ago

Deleeete commented 5 months ago

报时模块现在会生成结构如下的消息:

{
    "group_id": xxxxxxxx,
    "message": [
        {
            "type": "text",
            "data": {
                "text": "[TimeModule]\n"
            }
        },
        [
            {
                "type": "text",
                "data": {
                    "text": "2024/06/19 21:37:23"
                }
            },
            {
                "type": "face",
                "data": {
                    "id": "5"
                }
            }
        ]
    ]
}

试图发送该消息将导致如下错误:

[240619/21:37:25.611][Driver/OneBot/Caller][DEBUG] {"status":"failed","retcode":200,"data":null,"message":"TypeError: handlers[_0x46172f[_0x1c6a68(...)]] is not a function","wording":"TypeError: handlers[_0x46172f[_0x1c6a68(...)]] is not a function","echo":null}
Deleeete commented 5 months ago

已在155-module-adapt分支解决,待合入