nyxx_commander library Null safety
- 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.
- Provides common functionality for entities which can register subcommand or sub command groups.
- Handler for executing logic after executing command.
void>Function(CommandContext context, dynamic exception)
Callback called when command executions returns with Exception or Error (
exceptionvariable could be either).
void>Function(CommandContext context, String message)
- Handler for executing command logic.
void>Function(CommandContext context, String commandName, Logger logger)
- Callback to customize logger output when command is executed.
- Used to determine if command can be executed in given environment. Return true to allow executing command or false otherwise.
- 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.