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
Slash commands example: parse options into a map #1129
Conversation
If options can be recursive, we can implement that to the existing loop while unmarshalling. Otherwise, this should be good to go! |
If the subcommand example is correct, there can be parsed recursive options. However, they can't have the same name as other options. I will implement a recursive parse and example tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said in the original issue, DiscordGo is 1:1 mapping of Discord API. I don't think that adding an extra option, which would be just a reflection of the original, is a good idea.
That said, I think it would fair to still showcase parsing options into a map in the example.
Additionally, note my comments.
removes parseMap from the API and requires user inclusion
#1126 Method 3
The resulting example output: