- Basic implementation of command handler. Used internally in library.
- Helper class which describes context in which command is executed
- Base object for CommandHandler and CommandGroup
Lightweight command framework. Doesn't use
dart:mirrorsand can be used in browser. While constructing specify prefix which is string with prefix or implement PrefixHandlerFunction for more fine control over where and in what conditions commands are executed. [...]
- Creates command group. Pass a name to crated command and commands added via registerSubCommand will be subcommands og that group
- Handles command execution - requires to implement name field which returns name of command to match message content, and commandHandler callback which is fired when command matches message content.
CommandContext context ) → FutureOr< void>
- Handler for executing logic after executing command.
CommandContext context, dynamic exception ) → FutureOr< void>
Callback called when command executions returns with Exception or Error (
exceptionvariable could be either).
CommandContext context, String message ) → FutureOr< void>
- Handler for executing command logic.
CommandContext context, String commandName, Logger logger ) → FutureOr< void>
- Callback to customize logger output when command is executed.
CommandContext context ) → FutureOr< bool>
- Used to determine if command can be executed in given environment. Return true to allow executing command or false otherwise.
Message message ) → FutureOr< String>
- Handler used to determine prefix for command in given environment. Can be used to define different prefixes for different guild, users or dms. Return String containing prefix or null if command cannot be executed.