serenity-rs / serenity

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

Update `MessageReference` Struct #2994

Open MarkusTheOrt opened 2 weeks ago

MarkusTheOrt commented 2 weeks ago

the MessageReference struct is missing the type field (see here: https://discord.com/developers/docs/resources/message#message-reference-object)

I am happy to implement this myself, the question is do you want this added as a struct field, or make a union enum from this?

GnomedDev commented 2 weeks ago

This looks to be part of fowarding, which should have it's issue opened to track, but you can add this as a field as part of the forwarding work if you want. Use our enum_number! macro to make MessageReferenceType/Kind (depending what everything else is) and add it as a field.