twilight-rs / twilight

Powerful, flexible, and scalable ecosystem of Rust libraries for the Discord API.
https://discord.gg/twilight-rs
ISC License
652 stars 130 forks source link

Duplicate field error on Interaction when the `entitlements` field is present #2358

Closed jonastar closed 1 month ago

jonastar commented 1 month ago

Using the latest git version.

This seems to trigger if the field is present in the payload, the cause of the error is this line: https://github.com/twilight-rs/twilight/blob/main/twilight-model/src/application/interaction/mod.rs#L272

Erk- commented 1 month ago

I made a patch that should resolve this, if you have some time it would be nice if you could test it.

jonastar commented 1 month ago

Seems to work, was gonna open a pr myself but forgot to actually open the pr after i made the fix heh...