kordlib/kord

Message `nonce` field can be Integer or String, but Kord always deserializes it as a String

MrPowerGamerBR opened this issue · 0 comments

{"d": {"id": "990134009365401670", "tts": false, "type": 0, "flags": 0, "nonce": 6870, "author": {"id": "330770985450078208", "bot": true, "avatar": "6668e8af53a272e4cd72888d2183c97f", "username": "Aperture", "public_flags": 65536, "discriminator": "8658", "avatar_decoration": null}, "embeds": [], "member": {"deaf": false, "mute": false, "nick": null, "user": {"id": "330770985450078208", "bot": true, "avatar": "6668e8af53a272e4cd72888d2183c97f", "username": "Aperture", "public_flags": 65536, "discriminator": "8658", "avatar_decoration": null}, "flags": 0, "roles": ["753439237856165889", "751233962428596274"], "avatar": null, "pending": false, "joined_at": "2020-09-10T02:18:32.579000+00:00", "premium_since": null, "communication_disabled_until": null}, "pinned": false, "content": "`[02:59:03]` :outbox_tray: RGN-Rafaelk#​4169 (`568682176087064576`) left the server", "guild_id": "751223482515325088", "mentions": [], "timestamp": "2022-06-25T05:59:03.633000+00:00", "channel_id": "752735099971436584", "components": [], "attachments": [], "mention_roles": [], "edited_timestamp": null, "mention_everyone": false, "referenced_message": null}, "s": 246086, "t": "MESSAGE_CREATE", "op": 0}
kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 113: Expected quotation mark '"', but had '0' instead at path: $.d.nonce

https://cdn.discordapp.com/attachments/780520565408530442/990299184836001882/unknown.png