Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/SlashCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,15 @@ class SlashCommands {

const args: string[] = []

options.data.forEach(({ value }) => {
args.push(String(value))
})
for (let option of interaction.options.data) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a const here

Copy link
Copy Markdown
Author

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

if (option.type === 'SUB_COMMAND' || option.type === 'SUB_COMMAND_GROUP') {
option.options?.forEach(({ value }) => {
Copy link
Copy Markdown
Contributor

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

args.push(String(value))
})
} else {
args.push(String(option.value))
}
}

for (const [
checkName,
Expand Down