Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit empty SelectMenuOption.Emoji field #1476

Merged
merged 1 commit into from Jan 4, 2024

Conversation

phamill
Copy link
Contributor

@phamill phamill commented Jan 4, 2024

The emoji validation fixed in pr #1475 did not cover another emoji validation case with the SelectMenuOption. This fixes forward this breaking change from the API -

Example response from using a SelectMenuOption:

HTTP 400 Bad Request, {"message": "Invalid Form Body", "code": 50035, "errors": {"components": {"0": {"components": {"0": {"options": {"0": {"emoji": {"name": {"_errors": [{"code": "BUTTON_COMPONENT_INVALID_EMOJI", "message": "Invalid emoji"}]}}}}}}}}}}

@FedorLap2006 FedorLap2006 added this to the v0.28.0 milestone Jan 4, 2024
@FedorLap2006 FedorLap2006 added the fix Pull requests and issues related to bug fixes and structural inconsistencies label Jan 4, 2024
@FedorLap2006 FedorLap2006 merged commit afc5788 into bwmarrin:master Jan 4, 2024
8 checks passed
@FedorLap2006
Copy link
Collaborator

Thanks for your contribution!

@FedorLap2006 FedorLap2006 changed the title Modify SelectMenuOption Emoji field to omitempty Omit empty SelectMenuOption.Emoji field Jan 4, 2024
Earlopain pushed a commit to Earlopain/discordgo that referenced this pull request Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull requests and issues related to bug fixes and structural inconsistencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants