Command.slashOnly constructor Null safety
- String name,
- String description,
- Function execute,
- {List<
String> aliases = const [], - Iterable<
GroupMixin> children = const [], - Iterable<
AbstractCheck> checks = const [], - Iterable<
AbstractCheck> singleChecks = const [], - bool? hideOriginalResponse}
Create a new slash-only Command.
name
must match commandNameRegexp or an CommandRegistrationError will be thrown.
execute
must be a function whose first parameter must be of type InteractionContext.
Implementation
Command.slashOnly(
String name,
String description,
Function execute, {
List<String> aliases = const [],
Iterable<GroupMixin> children = const [],
Iterable<AbstractCheck> checks = const [],
Iterable<AbstractCheck> singleChecks = const [],
bool? hideOriginalResponse,
}) : this._(
name,
description,
execute,
InteractionContext,
aliases: aliases,
type: CommandType.slashOnly,
children: children,
checks: checks,
singleChecks: singleChecks,
hideOriginalResponse: hideOriginalResponse,
);