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

Change slashcommand json serialization #19

Merged
merged 1 commit into from
May 17, 2021

Conversation

d-nery
Copy link
Contributor

@d-nery d-nery commented May 17, 2021

As discussed on #18 , there is an issue with the json serialization when we have sub-commands with options

Based on https://github.com/nlohmann/json#arbitrary-types-conversions I created three to_json functions, one to serialize slashcommand, one to command_option and one to command_option_choice, the main function build_json is now much simpler and just creates the json object and adds the id field if necessary, the conversion is done automatically via each function.

@braindigitalis braindigitalis merged commit eb8816a into brainboxdotcc:dev May 17, 2021
braindigitalis pushed a commit that referenced this pull request Jan 30, 2022
braindigitalis pushed a commit that referenced this pull request Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants