-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CommandInfoService #13
Comments
This looks good! I have some feedback on the proposed API, though.
|
I made this determination too once I got into laying down the actual interfaces. The service has to return the non-generic anyways, since
No clue, but I put it in anyways until I find out otherwise.
Good point. Removed.
I wasn't quite sure how to handle this to be honest. I sort of figured I'd just figure this out when I got to it. I'm open to ideas though.
I was thinking of cheating here and pretending the root node was a group in its own right, just with a static name and description, since the root node (like a group), holds a list of groups and commands. Let me know if you don't feel this is realistic. |
I think the data model should be as close to the real thing as it can get, and the root node of the command tree is not a group node. What you could do is use |
Getting command information to build a help command is a common activity in any environment where a dedicated command parser is required. This command service should be able to return information on all commands, a branch of the command tree, or a single command node depending on user selection. Additionally, the command service should not make any assumptions about how the consumer of the
CommandHelpService
will render their command information, as each application would be different. For instance, a consumer in a console command line would likely want to display results differently than a consumer in a Discord bot.The description of the group, command, and argument would be pulled from
System.ComponentModel.DescriptionAttribute
. If no attribute is found,Description
will be null.Proposed API
The text was updated successfully, but these errors were encountered: