Class BaseHelpFormatter
Represents a base class for all default help formatters.
Namespace: DisCatSharp.CommandsNext.Converters
Assembly: DisCatSharp.CommandsNext.dll
Syntax
public abstract class BaseHelpFormatter
Constructors
| Improve this Doc View SourceBaseHelpFormatter(CommandContext)
Creates a new help formatter for specified CommandsNext extension instance.
Declaration
public BaseHelpFormatter(CommandContext ctx)
Parameters
Type | Name | Description |
---|---|---|
CommandContext | ctx | Context in which this formatter is being invoked. |
Properties
| Improve this Doc View SourceCommandsNext
Gets the CommandsNext extension which constructed this help formatter.
Declaration
protected CommandsNextExtension CommandsNext { get; }
Property Value
Type | Description |
---|---|
CommandsNextExtension |
Context
Gets the context in which this formatter is being invoked.
Declaration
protected CommandContext Context { get; }
Property Value
Type | Description |
---|---|
CommandContext |
Methods
| Improve this Doc View SourceBuild()
Constructs the help message.
Declaration
public abstract CommandHelpMessage Build()
Returns
Type | Description |
---|---|
CommandHelpMessage | Data for the help message. |
WithCommand(Command)
Sets the command this help message will be for.
Declaration
public abstract BaseHelpFormatter WithCommand(Command command)
Parameters
Type | Name | Description |
---|---|---|
Command | command | Command for which the help message is being produced. |
Returns
Type | Description |
---|---|
BaseHelpFormatter | This help formatter. |
WithSubcommands(IEnumerable<Command>)
Sets the subcommands for this command, if applicable. This method will be called with filtered data.
Declaration
public abstract BaseHelpFormatter WithSubcommands(IEnumerable<Command> subcommands)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Command> | subcommands | Subcommands for this command group. |
Returns
Type | Description |
---|---|
BaseHelpFormatter | This help formatter. |