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

Serialize NumberChoice as a Double, not as a String #405

Merged

Conversation

MrPowerGamerBR
Copy link
Contributor

The option generated by Kord

{"type":10,"name":"squish","description":"How much squishness you want in your pet?","required":false,"choices":[{"name":"Am I petting a rock?","value":"0.0"},{"name":"Kinda hard... but it is a bit squishy!","value":"0.25"},{"name":"Normal squishness","value":"0.875"},{"name":"Very squishy","value":"1.5"},{"name":"Pat him so he can feel it","value":"3.0"}]}

Discord's response:

{"21":{"options":{"1":{"choices":{"0":{"value":{"_errors":[{"code":"APPLICATION_COMMAND_CHOICES_VALUE_INVALID","message":"Choice values must be of type \"number\""}]}},"1":{"value":{"_errors":[{"code":"APPLICATION_COMMAND_CHOICES_VALUE_INVALID","message":"Choice values must be of type \"number\""}]}},"2":{"value":{"_errors":[{"code":"APPLICATION_COMMAND_CHOICES_VALUE_INVALID","message":"Choice values must be of type \"number\""}]}},"3":{"value":{"_errors":[{"code":"APPLICATION_COMMAND_CHOICES_VALUE_INVALID","message":"Choice values must be of type \"number\""}]}},"4":{"value":{"_errors":[{"code":"APPLICATION_COMMAND_CHOICES_VALUE_INVALID","message":"Choice values must be of type \"number\""}]}}}}}}}

image

@HopeBaron
Copy link
Member

After looking at this maybe a when would be better.

@HopeBaron HopeBaron added the hacktoberfest-accepted Pull requests participating in hacktoberfest label Oct 1, 2021
@HopeBaron HopeBaron merged commit 8d83c2e into kordlib:0.8.x Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Pull requests participating in hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants