Closed axiangcoding closed 1 year ago
是否有 debug 日志以及事件的原始JSON格式?
加入服务器未监听到事件,无日志
离开服务器(管理员踢出服务器)报错,附近日志如下:
2023-07-21T18:49:29.744+08:00 DEBUG 34116 --- [tcher-worker-18] l.f.s.k.api : [: ] API[GET /api/v3/guild/view] ======> query: guild_id=5345347076370957
2023-07-21T18:49:30.122+08:00 DEBUG 34116 --- [tcher-worker-11] l.f.s.k.api : [: ] API[GET /api/v3/guild/view] <====== status: 200 OK, response: HttpResponse[https://www.kookapp.cn/api/v3/guild/view?guild_id=5345347076370957, 200 OK]
2023-07-21T18:49:30.123+08:00 DEBUG 34116 --- [tcher-worker-11] l.f.s.k.api : [: ] API[GET /api/v3/guild/view] <====== post checker
2023-07-21T18:49:30.123+08:00 DEBUG 34116 --- [tcher-worker-11] l.f.s.k.api : [: ] API[GET /api/v3/guild/view] <====== result: {"code":0,"message":"操作成功","data":{"id":"5345347076370957","name":"AXBot研究所","topic":"","master_id":"2936837460","user_id":"2936837460","is_master":false,"icon":"https://img.kookapp.cn/icons/2023-04/Fi8obseMt606j06j.png?x-oss-process=style/icon","notify_type":2,"region":"shenzhen","enable_open":true,"open_id":"85413369","default_channel_id":"6531662732014684","welcome_channel_id":"3870371213640339","features":[],"boost_num":0,"buffer_boost_num":0,"level":0,"status":0,"auto_delete_time":"","recommend_info":{"guild_id":"5345347076370957","open_id":"85413369","default_channel_id":"6531662732014684","name":"AXBot研究所","icon":"https://img.kookapp.cn/icons/2023-04/Fi8obseMt606j06j.png?x-oss-process=style/icon","banner":"https://img.kookapp.cn/assets/2023-05/691vAMG9wN0ls0cs.png?x-oss-process=style/ld","desc":"AXBot机器人的社区服务器","status":1,"tag":"机器人社区","features":[],"level":0,"custom_id":"","is_official_partner":0,"sort":0,"audit_status":1,"update_day_gap":0},"roles":[{"role_id":15463908,"name":"管理员","color":16530222,"color_type":1,"color_map":[],"position":1,"hoist":0,"mentionable":0,"permissions":1,"type":0},{"role_id":19680993,"name":"开发者","color":15844367,"color_type":1,"color_map":[],"position":2,"hoist":1,"mentionable":1,"permissions":417127176,"type":0},{"role_id":19580132,"name":"Github HOOK","color":0,"color_type":1,"color_map":[],"position":5,"hoist":0,"mentionable":0,"permissions":14352,"type":1},{"role_id":19684246,"name":"AXBot","color":0,"color_type":1,"color_map":[],"position":7,"hoist":0,"mentionable":0,"permissions":137216,"type":1},{"role_id":20695693,"name":"K2机器人","color":0,"color_type":1,"color_map":[],"position":8,"hoist":0,"mentionable":0,"permissions":1,"type":1},{"role_id":20935360,"name":"AXBot测试机","color":0,"color_type":1,"color_map":[],"position":9,"hoist":0,"mentionable":0,"permissions":6144,"type":1},{"role_id":21729893,"name":"GithubHook","color":0,"color_type":1,"color_map":[],"position":10,"hoist":0,"mentionable":0,"permissions":0,"type":1},{"role_id":21731258,"name":"Koko助手","color":0,"color_type":1,"color_map":[],"position":11,"hoist":0,"mentionable":0,"permissions":1,"type":1},{"role_id":23448947,"name":"AXBot V2 测试机","color":0,"color_type":1,"color_map":[],"position":12,"hoist":0,"mentionable":0,"permissions":0,"type":1},{"role_id":0,"name":"@全体成员","color":0,"color_type":1,"color_map":null,"position":999,"hoist":0,"mentionable":0,"permissions":417126920,"type":255}],"channels":[{"id":"4252585599991711","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"","user_id":"2936837460","name":"机器人相关","topic":"","type":0,"level":200,"slow_mode":0,"last_msg_content":"","last_msg_id":"","has_password":false,"limit_amount":0,"is_category":true,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":0}],"permission_users":[]},{"id":"4558574486162120","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"","user_id":"2936837460","name":"社区交流","topic":"","type":0,"level":200,"slow_mode":0,"last_msg_content":"","last_msg_id":"","has_password":false,"limit_amount":0,"is_category":true,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":0}],"permission_users":[]},{"id":"1040515078551514","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"","user_id":"2936837460","name":"管理频道","topic":"","type":0,"level":200,"slow_mode":0,"last_msg_content":"","last_msg_id":"","has_password":false,"limit_amount":0,"is_category":true,"permission_sync":0,"permission_overwrites":[{"role_id":0,"allow":0,"deny":133128}],"permission_users":[]},{"id":"5260310581222640","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"4252585599991711","user_id":"2936837460","name":"通知中心","topic":"本频道作为和机器人有关事务的通知中心,建议不要屏蔽以获取最新资讯","type":1,"level":1,"slow_mode":0,"last_msg_content":"摸鱼又开摆的三三:@全体成员 战绩查询问题已修复,可以正常使用","last_msg_id":"1e2e8c13-9fae-4a95-b270-415c6869dc38","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":0,"permission_overwrites":[{"role_id":0,"allow":0,"deny":4096}],"permission_users":[]},{"id":"6531662732014684","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"4252585599991711","user_id":"2936837460","name":"机器人体验","topic":"如果想体验机器人,请在这个频道里体验","type":1,"level":2,"slow_mode":0,"last_msg_content":"AXBot 游戏姬:[卡片]","last_msg_id":"2999766e-bac6-4fe5-83a8-89eb30390b00","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":0}],"permission_users":[]},{"id":"3145740458578978","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"4252585599991711","user_id":"2936837460","name":"开发相关","topic":"此频道用作开发过程中的交流讨论","type":1,"level":3,"slow_mode":0,"last_msg_content":"Github HOOK:[卡片]","last_msg_id":"1dd39233-addf-4166-a5fd-940b7f3ce653","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":0}],"permission_users":[]},{"id":"6838111351038267","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"4252585599991711","user_id":"2936837460","name":"拉黑申述","topic":"如果你被机器人拉黑了,但是你觉得自己很委屈,可以来这个频道进行申诉。恶意的申诉可能会导致你同时被开发者拉黑","type":1,"level":4,"slow_mode":0,"last_msg_content":"摸鱼又开摆的三三:当然如果错了也可以跟我说我来看下","last_msg_id":"d2acf13e-ff6a-48af-b10b-88c8bc330968","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":0}],"permission_users":[]},{"id":"5044610582544778","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"4252585599991711","user_id":"2936837460","name":"问题反馈和意见建议","topic":"如果你在使用中遇到了问题,或者有什么意见或者建议,可以在这里留言","type":1,"level":5,"slow_mode":0,"last_msg_content":"摸鱼又开摆的三三:@滑稽 是的","last_msg_id":"7276f3f4-62ef-4766-8cd0-566c41c66920","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":0}],"permission_users":[]},{"id":"1877807279605226","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"4252585599991711","user_id":"2936837460","name":"功能申请","topic":"申请一些内测功能","type":1,"level":6,"slow_mode":0,"last_msg_content":"AXBot 游戏姬:[卡片]","last_msg_id":"9b8f0710-56c9-4cb5-bbe4-a0d6a5edfef3","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":0}],"permission_users":[]},{"id":"3045320646271496","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"4252585599991711","user_id":"2936837460","name":"赞助相关","topic":"","type":1,"level":7,"slow_mode":0,"last_msg_content":"摸鱼又开摆的三三:🤪 我知道这个设定挺抽象,但是考虑到也没什么人赞助,所以以后再优化了","last_msg_id":"277b26df-5d8d-40c0-a0de-2aeb2d365a2e","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":0}],"permission_users":[]},{"id":"7497761681809609","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"4252585599991711","user_id":"2936837460","name":"测试中心","topic":"此频道供日常测试使用,会有大量无意义信息,如果对开发不感兴趣,建议屏蔽","type":1,"level":8,"slow_mode":0,"last_msg_content":"AXBot V2 测试机:[卡片]","last_msg_id":"1b7953d7-1e85-47ba-a398-c26e50fb821a","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":0,"permission_overwrites":[{"role_id":19680993,"allow":2048,"deny":0},{"role_id":0,"allow":0,"deny":2048}],"permission_users":[]},{"id":"3870371213640339","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"4558574486162120","user_id":"2936837460","name":"会客厅","topic":"会客厅~","type":1,"level":1,"slow_mode":0,"last_msg_content":"系统通知:欢迎回来 @AXBot V2 测试机,但是我们刚刚弄丢了你的游戏存档...","last_msg_id":"d6f67eef-ddba-4bf9-b830-3581cefb936b","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":0}],"permission_users":[]},{"id":"7088215185441250","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"4558574486162120","user_id":"2936837460","name":"快捷链接","topic":"这里存放快捷链接,方便各位快速复制黏贴","type":1,"level":2,"slow_mode":0,"last_msg_content":"摸鱼又开摆的三三:使用手册(大陆可访问):https://www.yuque.com/axiangcoding/ei27mo/omy4cgwvsikrwue1","last_msg_id":"2e6c2b7a-ad0e-48e9-85b7-79b5471038e1","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":0,"permission_overwrites":[{"role_id":0,"allow":0,"deny":4096}],"permission_users":[]},{"id":"2862502357884837","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"4558574486162120","user_id":"2936837460","name":"闲聊","topic":"","type":1,"level":3,"slow_mode":0,"last_msg_content":"欢迎来到\"闲聊\"","last_msg_id":"","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":0}],"permission_users":[]},{"id":"6596809592291100","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"4558574486162120","user_id":"2936837460","name":"吐槽","topic":"","type":1,"level":4,"slow_mode":0,"last_msg_content":"欢迎来到\"吐槽\"","last_msg_id":"","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":0}],"permission_users":[]},{"id":"4241897032485635","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"1040515078551514","user_id":"2936837460","name":"退出播报","topic":"","type":1,"level":1,"slow_mode":0,"last_msg_content":"Koko助手:@AXBot V2 测试机 永远的离开了我们 🙏","last_msg_id":"4187f239-3764-46c2-a860-114e3ad52f24","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":133128}],"permission_users":[]},{"id":"6205569957346746","guild_id":"5345347076370957","master_id":"2936837460","parent_id":"1040515078551514","user_id":"2936837460","name":"撤回消息播报","topic":"","type":1,"level":2,"slow_mode":0,"last_msg_content":"Koko助手:[卡片]","last_msg_id":"a045a8a1-45db-49d0-8fba-7e02d34ccd43","has_password":false,"limit_amount":0,"is_category":false,"permission_sync":1,"permission_overwrites":[{"role_id":0,"allow":0,"deny":133128}],"permission_users":[]}],"user_config":{"notify_type":null,"nickname":"AXBot V2 测试机","role_ids":[23448947],"chat_setting":1,"security_limit":null,"close_mention_all_here":false,"close_mention_role":false,"hide_dnd_channel":0,"show_last_message":true}}}
2023-07-21T18:49:30.125+08:00 DEBUG 34116 --- [tcher-worker-11] l.f.s.k.api : [: ] API[GET /api/v3/guild/view] <====== rate limit: RateLimit(limit=120, remaining=119, reset=0, bucket=guild/view, isGlobalLimit=false)
2023-07-21T18:49:30.132+08:00 ERROR 34116 --- [tcher-worker-11] l.f.s.k.b.e.FXyJ3gXVXeAEpXUv : [: ] Event pre precess failure.
kotlinx.serialization.json.internal.JsonDecodingException: Expected class kotlinx.serialization.json.JsonObject as the serialized body of ID, but had class kotlinx.serialization.json.JsonLiteral
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24) ~[kotlinx-serialization-json-jvm-1.5.1.jar:?]
at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:94) ~[kotlinx-serialization-json-jvm-1.5.1.jar:?]
at kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeSerializableValue(TreeJsonDecoder.kt:52) ~[kotlinx-serialization-json-jvm-1.5.1.jar:?]
at kotlinx.serialization.internal.TaggedDecoder.decodeSerializableValue(Tagged.kt:207) ~[kotlinx-serialization-core-jvm-1.5.1.jar:1.5.1]
at kotlinx.serialization.internal.TaggedDecoder$decodeSerializableElement$1.invoke(Tagged.kt:280) ~[kotlinx-serialization-core-jvm-1.5.1.jar:1.5.1]
at kotlinx.serialization.internal.TaggedDecoder.tagBlock(Tagged.kt:297) ~[kotlinx-serialization-core-jvm-1.5.1.jar:1.5.1]
at kotlinx.serialization.internal.TaggedDecoder.decodeSerializableElement(Tagged.kt:280) ~[kotlinx-serialization-core-jvm-1.5.1.jar:1.5.1]
at love.forte.simbot.kook.api.guild.GuildView$$serializer.deserialize(GuildViewRequest.kt:129) ~[simbot-component-kook-api-3.0.0.0-alpha.7-SNAPSHOT.jar:?]
at love.forte.simbot.kook.api.guild.GuildView$$serializer.deserialize(GuildViewRequest.kt:129) ~[simbot-component-kook-api-3.0.0.0-alpha.7-SNAPSHOT.jar:?]
at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:61) ~[kotlinx-serialization-json-jvm-1.5.1.jar:?]
at kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeSerializableValue(TreeJsonDecoder.kt:52) ~[kotlinx-serialization-json-jvm-1.5.1.jar:?]
at kotlinx.serialization.json.internal.TreeJsonDecoderKt.readJson(TreeJsonDecoder.kt:25) ~[kotlinx-serialization-json-jvm-1.5.1.jar:?]
at kotlinx.serialization.json.Json.decodeFromJsonElement(Json.kt:127) ~[kotlinx-serialization-json-jvm-1.5.1.jar:?]
at love.forte.simbot.kook.api.ApiResult.parseData(KookApiResult.kt:217) ~[simbot-component-kook-api-3.0.0.0-alpha.7-SNAPSHOT.jar:?]
at love.forte.simbot.kook.api.ApiResult.parseDataOrThrow(KookApiResult.kt:236) ~[simbot-component-kook-api-3.0.0.0-alpha.7-SNAPSHOT.jar:?]
at love.forte.simbot.kook.api.KookApiRequest.requestData$suspendImpl(KookApiRequest.kt:292) ~[simbot-component-kook-api-3.0.0.0-alpha.7-SNAPSHOT.jar:?]
at love.forte.simbot.kook.api.KookApiRequest$requestData$1.invokeSuspend(KookApiRequest.kt) ~[simbot-component-kook-api-3.0.0.0-alpha.7-SNAPSHOT.jar:?]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [kotlin-stdlib-1.8.22.jar:1.8.22-release-407(1.8.22)]
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) [kotlinx-coroutines-core-jvm-1.6.4.jar:?]
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) [kotlinx-coroutines-core-jvm-1.6.4.jar:?]
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) [kotlinx-coroutines-core-jvm-1.6.4.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) [kotlinx-coroutines-core-jvm-1.6.4.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) [kotlinx-coroutines-core-jvm-1.6.4.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) [kotlinx-coroutines-core-jvm-1.6.4.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) [kotlinx-coroutines-core-jvm-1.6.4.jar:?]
是否有 debug 日志以及事件的原始JSON格式?
怎么获取事件的原始内容?trace似乎只看到了API请求
怎么获取事件的原始内容?trace似乎只看到了API请求
可能重构结束前这方面的日志还是有些缺,有时间的话这个问题我先自己处理一下吧
补充说明:实际上日志不缺,与事件有关的日志在 love.forte.simbot.kook.bot.event
命名下,开启 DEBUG 可以看到原始事件内容
版本号
v3.2.0
附加版本
love.forte.simbot.component:simbot-component-qq-guild-core:3.2.0.0-alpha.10
涉及的编程语言
Java
项目构建工具
Gradle
涉及的组件库
KOOK
问题描述
KOOK机器人加入服务器和退出服务器事件处理失败
复现方式
监听代码
使用邀请链接让机器人加入服务器,机器人成功加入服务器,但报错
管理员将机器人踢出服务器,未收到exitGuild的事件
相关日志
No response
其他补充
No response