serenity-rs / serenity

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

impl From<EmojiId> for ReactionType doesn't produce a valid reaction #2867

Closed jamesbt365 closed 3 months ago

jamesbt365 commented 3 months ago

When attempting to create a reaction with a ReactionType directly generated by this impl all requests will fail, The name cannot be None, but it can be anything else, consider using something like "reaction" for the name instead.

What happens when you try and use a ReactionType without a name:

Http(UnsuccessfulRequest(ErrorResponse { status_code: 400, url: "https://discord.com/api/v10/channels/1235087573421133824/messages/1241909429977481246/reactions/:1218258296272715836/@me", method: PUT, error: DiscordJsonError { code: 10014, message: "Unknown Emoji", errors: [] } }))
jamesbt365 commented 3 months ago

Also see #2156