Skip to content

Commit

Permalink
provides fix for AlexzanderFlores#219
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdaddytalk committed May 6, 2022
1 parent 7288596 commit 1f29134
Showing 1 changed file with 9 additions and 3 deletions.
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) {
if (option.type === 'SUB_COMMAND' || option.type === 'SUB_COMMAND_GROUP') {
option.options?.forEach(({ value }) => {
args.push(String(value))
})
} else {
args.push(String(option.value))
}
}

for (const [
checkName,
Expand Down

0 comments on commit 1f29134

Please sign in to comment.