slash command type issue
./lib/types/command.ts
:
userinfo.ts
:
how do I fix this issue? like if I add Omit<SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup">
it gets fixed but then there can I'll have to add more like "addBooleanOption" | "addUserOption" | .....
, I just want it to be a slashcommand builder, it can have subcommands or not, or just options, etc.2 Replies
- 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.
- Issue solved? Press the button!^14.11.0
and v18.16.0
for now, I did: but I don't think this is the best way to do it, I just want to set it as a SlashCommandBuilder not wanna check if it's subCommandsOnly, or a few things are ommited, etc
but I don't wanna define a lot of types there though
yes
the pick seems to be working well and not breaking other commands, until now I only had commands of type SlashCommandBuilder | SlashCommandSubcommandsOnlyBuilder so didn't need a check, but the userinfo command was none of them and was ommiting subcmd and subcmdGroup