Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

事件类型 PUBLIC_MESSAGE_DELETE 解析错误 #37

Open
ForteScarlet opened this issue Jul 14, 2022 · 3 comments
Open

事件类型 PUBLIC_MESSAGE_DELETE 解析错误 #37

ForteScarlet opened this issue Jul 14, 2022 · 3 comments
Labels
bug? 疑似为bug或存在普遍问题

Comments

@ForteScarlet
Copy link
Member

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 ForteScarlet added the bug Something isn't working label Jul 14, 2022
ForteScarlet added a commit that referenced this issue Jul 14, 2022
但是仅抑制错误。此事件文档中暂无结构说明,因此暂时不做解析,以 `Unit` 为序列化目标。

see #37
@ForteScarlet
Copy link
Member Author

重构后还未测试

@ForteScarlet
Copy link
Member Author

ForteScarlet commented Apr 2, 2023

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 added a commit that referenced this issue Apr 2, 2023
增加新的 `Unknown` 事件类型来解决未知事件无法处理的问题
@ForteScarlet
Copy link
Member Author

ForteScarlet commented Apr 5, 2023

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

@ForteScarlet ForteScarlet added 缺陷 and removed bug Something isn't working labels Apr 5, 2023
@ForteScarlet ForteScarlet added bug? 疑似为bug或存在普遍问题 and removed 缺陷 labels Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? 疑似为bug或存在普遍问题
Projects
None yet
Development

No branches or pull requests

1 participant