Usage without children

Can I somehow get the usage of a command excluding any children?
Usecase: I want to make a better /help overview for my command, and I want each children’s usage on a different line. I want the base command’s usage without children at the top

Bump
<aaaaaaaaaaaaaaaaa=b>

For all CommandCallable? You can’t as child commands are only present in the implementations of CommandCallable. For CommandSpec you have a better chance at it, but the code probably won’t be pretty. Basically the different child commands are implemented as actual arguments to the command. The class you are looking for is ChildCommandElementExecutor, it’s wrapped in optional, firstParsing or multiple elements in some instances, so you have to check for that too. From there on get the arguments that are not the children, and get their usage directly.

1 Like