ChatCommand.slashOnly constructor Null safety

ChatCommand.slashOnly(
  1. String name,
  2. String description,
  3. Function execute,
  4. {List<String> aliases = const [],
  5. Iterable<IChatCommandComponent> children = const [],
  6. Iterable<AbstractCheck> checks = const [],
  7. Iterable<AbstractCheck> singleChecks = const [],
  8. CommandOptions options = const CommandOptions(),
  9. Map<Locale, String>? localizedNames,
  10. Map<Locale, String>? localizedDescriptions}
)

Create a new ChatCommand with type CommandType.slashOnly.

Implementation

ChatCommand.slashOnly(
  String name,
  String description,
  Function execute, {
  List<String> aliases = const [],
  Iterable<IChatCommandComponent> children = const [],
  Iterable<AbstractCheck> checks = const [],
  Iterable<AbstractCheck> singleChecks = const [],
  CommandOptions options = const CommandOptions(),
  Map<Locale, String>? localizedNames,
  Map<Locale, String>? localizedDescriptions,
}) : this._(
        name,
        description,
        execute,
        InteractionChatContext,
        aliases: aliases,
        type: CommandType.slashOnly,
        children: children,
        checks: checks,
        singleChecks: singleChecks,
        options: options,
        localizedNames: localizedNames,
        localizedDescriptions: localizedDescriptions,
      );