CommandGroup class Null safety

Creates command group. Pass a name to crated command and commands added via registerSubCommand will be subcommands og that group

Inheritance
Mixed in types

Constructors

CommandGroup({String name = "", List<String> aliases = const [], CommandHandler? defaultHandler, PassHandlerFunction? beforeHandler, AfterHandlerFunction? afterHandler, CommandGroup? parent})
Creates command group. Pass a name to crated command and commands added via registerSubCommand will be subcommands og that group

Properties

afterHandler AfterHandlerFunction?
Callback executed after executing command
final
aliases List<String>
Aliases of CommandEntity
final
beforeHandler PassHandlerFunction?
Executed before executing command. Used to check if command can be executed in current context.
final
commandNames List<String>
A list of valid command names
read-only, inherited
defaultHandler CommandHandler?
Default CommandHandler for CommandGroup - it will be executed then no other command from group match
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
name String
Name of CommandEntity
final
parent CommandGroup?
Parent of entity
read / write, override-getter
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

getFullCommandMatch() String
RegEx matching the fully qualified command name with its parents and all aliases
inherited
isEntityName(String str) bool
Returns true if provided String str is entity name or alias
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
registerCommandEntity(CommandEntity entity) → void
Registers CommandEntity within context of this instance. Throws error if there is command with same name as provided.
inherited
registerCommandGroup(CommandGroup commandGroup) → void
Registers command as implemented CommandEntity class
registerDefaultCommand(CommandHandlerFunction commandHandler, {PassHandlerFunction? beforeHandler, AfterHandlerFunction? afterHandler}) → void
Registers default command handler which will be executed if no subcommand is matched to message content
registerSubCommand(String name, CommandHandlerFunction commandHandler, {PassHandlerFunction? beforeHandler, AfterHandlerFunction? afterHandler}) → void
Registers subcommand
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited