Group class Null safety

A Group is a simple class that allows GroupMixins to be instanciated.

This allows GroupMixin functionality to be used without the additional bloat of a Command or CommandsPlugin

Mixed in types


Group(String name, String description, {Iterable<String> aliases = const [], Iterable<GroupMixin> children = const [], Iterable<AbstractCheck> checks = const []})
Construct a new Group


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


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


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