CommandGroup class
Constructors
-
CommandGroup({String name = "", List<
String> aliases = const [], CommandHandlerAbstract? 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
finalinherited
-
aliases
→ List<
String> -
Aliases of
CommandEntityAbstract
finalinherited - beforeHandler → PassHandlerFunction?
-
Executed before executing command.
Used to check if command can be executed in current context.
finalinherited
-
commandEntities
→ List<
ICommandEntity> -
finalinherited
-
commandNames
→ List<
String> -
A list of valid command names
no setterinherited
- defaultHandler ↔ CommandHandlerAbstract?
-
Default
CommandHandlerAbstract
forBasicCommandGroup
- it will be executed then no other command from group matchgetter/setter pairinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Name of
CommandEntityAbstract
finalinherited - parent ↔ BasicCommandGroup?
-
Parent of entity
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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 aliasinherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerCommandEntity(
ICommandEntity entity) → void -
Registers
CommandEntity
within context of this instance. Throws error if there is command with same name as provided.inherited -
registerCommandGroup(
BasicCommandGroup commandGroup) → void -
Registers command as implemented
CommandEntityAbstract
classinherited -
registerDefaultCommand(
CommandHandlerFunction commandHandler, {PassHandlerFunction? beforeHandler, AfterHandlerFunction? afterHandler}) → void -
Registers default command handler which will be executed if no subcommand is matched to message content
inherited
-
registerSubCommand(
String name, CommandHandlerFunction commandHandler, {PassHandlerFunction? beforeHandler, AfterHandlerFunction? afterHandler}) → void -
Registers subcommand
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited