Hyperfire - How would i ago about adding custom fi...
How would i ago about adding custom fields to commands? Like for example aliases
5 Replies
I should add I'm using @ApplyOptions
And it's not letting me add stuff like aliases
Not alises
Aliases*
I meant usages
Like how would I add usages to my commands
Chuck it into https://www.sapphirejs.dev/docs/Documentation/api-framework/interfaces/CommandOptions#detaileddescription
Other than that, the reason it doesn't let you is because you then haven't done some basic typescript stuff. Namely you can extend the command class sure but you'll also have to extend the CommandOptions interface and then use that instead of the base one.
I can use the command options interface perfectly fine, but I'm wondering how I can set up stuff like usages for my help command
Just answered that
Chuck it into detailedDescription
And you can type it with module augmention
So I just use detailedDescription as my usage thing
And in help I add the field with name Usage and the value as the detailedDescription