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

Properties

childrenMap Map<String, GroupMixin>
A mapping of child names to children. [...]
final
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. [...]
read-only
parent GroupMixin?
The parent of this group, if any.
read-only
name String
The name of this group.
read-only
aliases Iterable<String>
A list of aliases that can also be used to refer to this group.
read-only
description String
A description of what this group represents.
read-only
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
fullName String
The full name of this group. [...]
read-only
depth int
The depth of this group. [...]
read-only
hasSlashCommand bool
Whether this group contains any slash commands. [...]
read-only
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

Methods

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. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

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