serenity-rs / serenity

A Rust library for the Discord API.
https://discord.gg/serenity-rs
ISC License
4.65k stars 571 forks source link

Invalid Type Error #2892

Closed IBims1NicerTobi closed 2 months ago

IBims1NicerTobi commented 2 months ago

Iterating over all the messages in a server yields me an invalid type error every time. The error is: invalid type: string "#d0334d", expected u32 at line 1 column 123537 I don't really know what to do in order to help debug this but I assume this is a deserialization error. Branch: current

GnomedDev commented 2 months ago

This is most likely caused by #2882 missing deserialize_with = "discord_colours" for MessageReaction::burst_colours. Can you confirm @jamesbt365?

IBims1NicerTobi commented 2 months ago

Ok I am testing rn with

#[serde(rename = "burst_colors", deserialize_with = "discord_colours")]
pub burst_colours: Option<Vec<Colour>>,

in message.rs and I will report back if that fixes it :)

jamesbt365 commented 2 months ago

This is most likely caused by #2882 missing deserialize_with = "discord_colours" for MessageReaction::burst_colours. Can you confirm @jamesbt365?

I did miss rename on that one, so I'm almost certain its needed here too. will investigate shortly and open a PR for it.