simbot-component-qq-guild icon indicating copy to clipboard operation
simbot-component-qq-guild copied to clipboard

事件类型 `PUBLIC_MESSAGE_DELETE` 解析错误

Open ForteScarlet opened this issue 3 years ago • 3 comments

love.forte.simbot.SimbotIllegalStateException: Unknown event type: PUBLIC_MESSAGE_DELETE. data: Dispatch(data={"message":{"author":{"bot":false,"id":"xxx","username":"xxx"},"channel_id":"xxx","guild_id":"xxx","id":"xxx"},"op_user":{"id":"14072671896854096427"}}, type=PUBLIC_MESSAGE_DELETE, seq=3)
	at love.forte.simbot.tencentguild.core.internal.TencentGuildBotImpl$processEvent$3.invokeSuspend(TencentGuildBotImpl.kt:438)
	at love.forte.simbot.tencentguild.core.internal.TencentGuildBotImpl$processEvent$3.invoke(TencentGuildBotImpl.kt)
	at love.forte.simbot.tencentguild.core.internal.TencentGuildBotImpl$processEvent$3.invoke(TencentGuildBotImpl.kt)
	at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit(Emitters.kt:223)
	at love.forte.simbot.tencentguild.core.internal.TencentGuildBotImpl$processEvent$$inlined$mapNotNull$1$2.emit(Emitters.kt:245)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:62)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl$FlowKt__ChannelsKt(Channels.kt:1)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Channels.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

ForteScarlet avatar Jul 14 '22 02:07 ForteScarlet

重构后还未测试

ForteScarlet avatar Mar 31 '23 18:03 ForteScarlet

Received text frame raw: {"op":0,"s":12,"t":"PUBLIC_MESSAGE_DELETE","id":"PUBLIC_MESSAGE_DELETE:xxx","d":{"message":{"author":{"bot":false,"id":"xxx","username":"xxx"},"channel_id":"xxx","guild_id":"xxx","id":"xxx"},"op_user":{"id":"xxx"}}}
Exception in thread "DefaultDispatcher-worker-5" kotlinx.serialization.json.internal.JsonDecodingException: Polymorphic serializer was not found for class discriminator 'PUBLIC_MESSAGE_DELETE'
JSON input: .....xxx"},"op_user":{"id":"xxx"}}}
        at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
        at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
        at kotlinx.serialization.json.internal.PolymorphicKt.throwSerializerNotFound(Polymorphic.kt:79)
        at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:68)
        at kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeSerializableValue(TreeJsonDecoder.kt:52)
        at kotlinx.serialization.json.internal.TreeJsonDecoderKt.readJson(TreeJsonDecoder.kt:25)
        at kotlinx.serialization.json.Json.decodeFromJsonElement(Json.kt:116)
        at love.forte.simbot.qguild.internal.BotImpl$ReceiveEvent.invoke(BotImpl.kt:653)
        at love.forte.simbot.qguild.internal.BotImpl$ReceiveEvent$invoke$1.invokeSuspend(BotImpl.kt)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
        Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [CoroutineName(QGBot.101986850), StandaloneCoroutine{Cancelling}@90429c5, Dispatchers.Default]

ForteScarlet avatar Apr 02 '23 13:04 ForteScarlet

截至目前文档中尚无此事件的说明,无法进行支持。

ForteScarlet avatar Apr 05 '23 17:04 ForteScarlet