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:mirrors and 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.


AfterHandlerFunction(CommandContext context) FutureOr<void>
Handler for executing logic after executing command.
CommandExecutionError(CommandContext context, dynamic exception) FutureOr<void>
Callback called when command executions returns with Exception or Error (exception variable could be either).
CommandHandlerFunction(CommandContext context, String message) FutureOr<void>
Handler for executing command logic.
LoggerHandlerFunction(CommandContext context, String commandName, Logger logger) FutureOr<void>
Callback to customize logger output when command is executed.
PassHandlerFunction(CommandContext context) FutureOr<bool>
Used to determine if command can be executed in given environment. Return true to allow executing command or false otherwise.
PrefixHandlerFunction(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.