diff --git a/src/handlers/command.js b/src/handlers/command.js index ae934f4f1..dd0ed1237 100644 --- a/src/handlers/command.js +++ b/src/handlers/command.js @@ -178,7 +178,7 @@ module.exports = { */ getSlashUsage(cmd) { let desc = ""; - if (cmd.slashCommand.options.find((o) => o.type === ApplicationCommandOptionType.Subcommand)) { + if (cmd.slashCommand.options?.find((o) => o.type === ApplicationCommandOptionType.Subcommand)) { const subCmds = cmd.slashCommand.options.filter((opt) => opt.type === ApplicationCommandOptionType.Subcommand); subCmds.forEach((sub) => { desc += `\`/${cmd.name} ${sub.name}\`\n❯ ${sub.description}\n\n`;