Skip to content
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

[WIP] Add CommandHelpService #14

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Foxtrek64
Copy link
Sponsor

@Foxtrek64 Foxtrek64 commented Dec 21, 2021

Fixes #13

  • Add ability to hide commands/groups from the help service.
    • Add test to ensure they're actually hidden.
  • Add Description property to commands (to mirror Groups)
    • Add test to ensure description property is populated.
  • Implement information types
    • IGroupInfo
      • GroupInfo
    • ICommandInfo
      • CommandInfo
    • ICommandArgumentInfo
      • CommandArgumentInfo
    • IConditionInfo
      • ConditionInfo
  • Implement CommandInformationService
    • Add test to command info builder.
    • Add test to command group builder.
    • Determine how to handle child groups - lazy load or just load everything always?

@Nihlus Nihlus marked this pull request as draft December 21, 2021 16:54
@Foxtrek64 Foxtrek64 changed the title [WIP] Add HiddenFromHelpAttribute [WIP] Add CommandHelpService Dec 23, 2021
Copy link
Member

@Nihlus Nihlus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

One caveat/question - conditions can be applied to groups and parameters, not just commands. You'll want to look into handling that as well.

Remora.Commands/CommandInformation/CommandArgumentInfo.cs Outdated Show resolved Hide resolved
string? Description,
IReadOnlyList<string> Aliases,
bool Hidden,
string? HiddenFromHelpComment,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about the naming of this property - could we come up with a better name?

Remora.Commands/CommandInformation/ConditionInfo.cs Outdated Show resolved Hide resolved
string? Description,
IReadOnlyList<string> Aliases,
bool Hidden,
string? HiddenFromHelpComment,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Remora.Commands/Services/CommandHelpService.cs Outdated Show resolved Hide resolved
Remora.Commands/Services/CommandHelpService.cs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CommandInfoService
2 participants