-
Notifications
You must be signed in to change notification settings - Fork 59
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
provides fix for #219 #220
base: main
Are you sure you want to change the base?
Conversation
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.
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) { |
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.
Use a const here
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.
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 }) => { |
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.
I don't like to mix forEach and for in loops but that's personal preference
agreed on questioning converting all args to strings. |
it's a breaking change so maybe we name it differently until args is deprecated. Isn't necessary though. |
No description provided.