provides fix for #219#220
Open
mcdaddytalk wants to merge 1 commit into
Open
Conversation
tippfehlr
reviewed
Jun 16, 2022
Contributor
tippfehlr
left a comment
There was a problem hiding this comment.
I didn't test it but this seems good.
We have to think about converting all args to strings though: i find it annoying to use const foo = args[n] === 'true' and getBoolean() from discord.js is easier I think.
| options.data.forEach(({ value }) => { | ||
| args.push(String(value)) | ||
| }) | ||
| for (let option of interaction.options.data) { |
Author
There was a problem hiding this comment.
Easy enough to change. Will submit new commit
| }) | ||
| for (let option of interaction.options.data) { | ||
| if (option.type === 'SUB_COMMAND' || option.type === 'SUB_COMMAND_GROUP') { | ||
| option.options?.forEach(({ value }) => { |
Contributor
There was a problem hiding this comment.
I don't like to mix forEach and for in loops but that's personal preference
Author
|
agreed on questioning converting all args to strings. |
Contributor
|
it's a breaking change so maybe we name it differently until args is deprecated. Isn't necessary though. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.