slight modification to help
diff --git a/src/commands/help.ts b/src/commands/help.ts
index 1a0ce16..26d86c5 100644
--- a/src/commands/help.ts
+++ b/src/commands/help.ts
@@ -53,10 +53,12 @@
`**${current.name}**\n\n` +
`${current.description}`
)
- if(current.options.filter((option) => option.type === ApplicationCommandOptionType.SubcommandGroup).length > 0) {
+ const subcommands = current.options.filter((option) => option.type === ApplicationCommandOptionType.Subcommand);
+ const subcommandGroups = current.options.filter((option) => option.type === ApplicationCommandOptionType.SubcommandGroup);
+ if(subcommandGroups.length > 0) {
subcommandGroupRow.components[0]!
.addOptions(
- current.options.filter((option) => option.type === ApplicationCommandOptionType.SubcommandGroup).map((option) => {
+ subcommandGroups.map((option) => {
return {
label: option.name,
value: option.name
@@ -64,10 +66,10 @@
})
)
} else {
- if(current.options.filter((option) => option.type === ApplicationCommandOptionType.Subcommand).length > 0) {
+ if(subcommands.length > 0) {
subcommandRow.components[0]!
.addOptions(
- current.options.filter((option) => option.type === ApplicationCommandOptionType.Subcommand).map((option) => {
+ subcommands.map((option) => {
return {
label: option.name,
value: option.name