Closed axiangcoding closed 1 year ago
尝试开启 love.forte.simbot.component.kook.bot
的 TRACE
级别日志并尝试提供在接收事件时的原始 JSON 字符串,
这个日志的文本部分内容可能是这个样子的:
On signal: { ... }
以 On signal:
开头。
尝试开启
love.forte.simbot.component.kook.bot
的TRACE
级别日志并尝试提供在接收事件时的原始 JSON 字符串, 这个日志的文本部分内容可能是这个样子的:On signal: { ... }
以
On signal:
开头。
找到一条相关的
2023-06-27T23:49:42.186+08:00 DEBUG 65988 --- [ task-2] l.f.s.c.k.m.ReceiveMessageContent : [: ] Cannot decode card message content [[{"theme":"success","color":"","size":"lg","modules":[{"type":"header","text":{"type":"plain-text","emoji":true,"content":"你好,我是AXBot","elements":[]},"elements":[]},{"type":"divider","elements":[]},{"type":"section","mode":"left","accessory":null,"text":{"type":"kmarkdown","content":"现在是北京时间: *2023-06-27T23:49:41.634649792*","elements":[]},"elements":[]},{"type":"section","mode":"left","accessory":null,"text":{"type":"kmarkdown","content":"你似乎输入了一个错误的命令:`你好`","elements":[]},"elements":[]},{"type":"section","mode":"left","accessory":null,"text":{"type":"kmarkdown","content":"需要我做些什么呢?如果不知道怎么开始,可以输入 `axbot 帮助` 开始探索","elements":[]},"elements":[]},{"type":"divider","elements":[]},{"type":"section","mode":"right","accessory":{"type":"button","theme":"primary","value":"https:\/\/www.kookapp.cn\/app\/oauth2\/authorize?id=15253&permissions=924672&client_id=eXJ0-Ntgqw-q33Oe&redirect_uri=&scope=bot","click":"link","text":{"type":"kmarkdown","content":"邀请AXBot","elements":[]},"external":false,"elements":[]},"text":{"type":"kmarkdown","content":"邀请机器人加入你的服务器!","elements":[]},"elements":[]},{"type":"divider","elements":[]},{"type":"section","mode":"right","accessory":{"type":"button","theme":"info","value":"https:\/\/github.com\/axiangcoding\/AXBot","click":"link","text":{"type":"kmarkdown","content":"GitHub","elements":[]},"external":true,"elements":[]},"text":{"type":"kmarkdown","content":"Powered By AXBot.","elements":[]},"elements":[]}],"type":"card"}]] to CardMessage, as text.
看起来是
[
[
{
"theme": "success",
"color": "",
"size": "lg",
"modules": [
{
"type": "header",
"text": { # 这里识别为 字符串了,而实际上是个对象
"type": "plain-text",
"emoji": true,
"content": "你好,我是AXBot",
"elements": []
},
"elements": []
},
{ "type": "divider", "elements": [] },
{
v3.0.0.0-alpha.7-SNAPSHOT
,届时可尝试使用此快照版本。如果问题解决可关闭此 issue,如果问题依旧存在则请继续反馈,感谢😊使用快照时注意添加快照仓库地址
repositories {
mavenCentral()
// 快照仓库
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
mavenContent {
snapshotsOnly()
}
}
}
版本号
v3.1.0
附加版本
simbot-component-kook-core:3.0.0.0-alpha.6
涉及的编程语言
Java
项目构建工具
Gradle
涉及的组件库
KOOK
问题描述
解析一些格式的CardMessage失败
复现方式
将下文消息发送到一个监听的频道中,即可稳定复现
监听代码如下,springboot项目中注册bean:
相关日志
其他补充
对应的CardMessage的json如下: