how to check command group and subcommand

if (i.isAutocomplete() && i.options?.getSubcommandGroup(false) === "cosmetics" && i.options?.getSubcommand(false) === "search")
if (i.isAutocomplete() && i.options?.getSubcommandGroup(false) === "cosmetics" && i.options?.getSubcommand(false) === "search")
is there any way better to check the options of the command without all the "false"
6 Replies
d.js docs
d.js docs2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Jaworek
Jaworek2y ago
remove the false its false by default
Creeper
Creeper2y ago
i don't think so because i am getting error without passing false
Creeper
Creeper2y ago
Creeper
Creeper2y ago
yeah its not
Creeper
Creeper2y ago
oh how come get subcommand still throws an error but get subcommand group doesn't