Him188

Results 701 comments of Him188

Simplified reproducer: ```kotlin @Serializable data class User( val mailAddress: String? = null, val name: String, ) ``` ```kotlin default.decodeFromString(User.serializer(), """ name: cssxsh mailAddress: [email protected] """) } ```

Root cause is wrong `decodeNullableSerializableElement`

Unfortunately, no.

As a temporary workaround, please do `removePrefix("---")` before calling `decodeFromString`.

我猜你遇到的问题是在日志 ``` 2022-08-26 18:09:38.706 | INFO | main:group_message_handler:61 - 收到来自群 中成员 的消息:你们好 ``` 之后,在群里发消息, bot 不会有日志提示了 那这就不是 mirai 的问题

这是个已知问题, 2.0 左右就出现过了, 2.4 左右有尽力优化过一次, 现在找不到更好的解决方案

这些类型是根据服务器发来类型对应解析的,所以说服务器就发了错误的类型

可以顺便加 `@since 2.14`

很早以前就有这个问题了, 概率的, 我遇到过

为什么你每次 push 我都要重新 approve, GitHub 改规则了? ![image](https://user-images.githubusercontent.com/12100985/190459999-499eefeb-9002-4cdb-b0d1-ce9f09df4583.png)