GroupMixin mixin Null safety

A Group is a collection of commands. This mixin implements that functionality.

All Groups, Commands and CommandsPlugins use this mixin to enable nesting and registration of commands.

Mixin Applications


childrenMap Map<String, GroupMixin>
A mapping of child names to children. [...]
preCallController StreamController<Context>
@protected, final
postCallController StreamController<Context>
@protected, final
onPreCall Stream<Context>
A Stream of Contexts that emits after the checks have succeeded, but before Command.execute is called.
late, final
onPostCall Stream<Context>
A Stream of Contexts that emits after Command.execute has successfully been called (no exceptions were thrown).
late, final
children Iterable<GroupMixin>
An iterable of all this groups children. [...]
parent GroupMixin?
The parent of this group, if any.
name String
The name of this group.
aliases Iterable<String>
A list of aliases that can also be used to refer to this group.
description String
A description of what this group represents.
checks Iterable<AbstractCheck>
A list of functions that must return true for any descendant of this group to be executed. These are called before command invocation and can cause it to fail. [...]
fullName String
The full name of this group. [...]
depth int
The depth of this group. [...]
hasSlashCommand bool
Whether this group contains any slash commands. [...]
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


getCommand(StringView view) Command?
Get a Command based off a StringView. [...]
addCommand(GroupMixin command) → void
Add a child to this group. [...]
registerChild(GroupMixin child) → void
Add a child to this group. [...]
@Deprecated('Use addCommand() instead')
walkCommands() Iterable<Command>
Iterate over all the commands in this group and any subgroups.
getOptions(CommandsPlugin commands) Iterable<CommandOptionBuilder>
Build the options for registering this group to the Discord API for slash commands.
check(AbstractCheck check) → void
Add a check to this groups checks.
toString() String
A string representation of this object. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]


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