Currently there is no way to set permissions for specific slash subcommands. They can only be set for the command as a whole using
.setDefaultMemberPermissions() or passing a sole object. I have a large bot for which I decided recode all legacy commands into slash commands. I ran into this problem that I have commands with some subcommands that can be ran by everyone, and some subcommands that can only be ran by administrators or require some other permission. When I started with slash commands I first thought I would be able to set required permissions for each subcommand, but that is apparently not the case. I know that I can make my own handler to handle subcommand permissions, but the thing is, when a user doesnt have required permissions for a slash command, it is hidden from the user when he types
/. And thats what I want to achieve for subcommands. I want a user to see only subcommands that he has access to, other subcommands should be hidden from them.
I got an idea of making all commands without subcommands to bypass this. But obviously that is not how it should be and makes subcommands useless.
So to sum it up, I am wondering if assigning required permissions for individual slash subcommands will be possible. Are you planning to add that feature or will you consider it if you havent thought about it yet?