Interface ICommandParser
- Namespace
- Signal.Application.Commands.Parsing
- Assembly
- Signal.Application.dll
Recognises command invocations in message text.
public interface ICommandParser
Methods
TryParse(string?, out ParsedCommand?)
Parses text if it starts with a configured prefix directly followed by a command name.
bool TryParse(string? text, out ParsedCommand? command)
Parameters
textstringThe message text.
commandParsedCommandThe parsed invocation when the method returns true.
Returns
TryParse(string?, IReadOnlyList<string>, out ParsedCommand?)
Parses text using prefixes instead of the configured ones (per-conversation
prefixes). Added after 0.4; the default ignores prefixes and uses the configured prefixes.
bool TryParse(string? text, IReadOnlyList<string> prefixes, out ParsedCommand? command)
Parameters
textstringThe message text.
prefixesIReadOnlyList<string>The prefixes to accept (longest match wins).
commandParsedCommandThe parsed invocation when the method returns true.