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