Skip to content

Commit

Permalink
Remove CommandArgument helper class
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexedia committed Mar 11, 2024
1 parent 3b4a2f2 commit ce95467
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 41 deletions.
13 changes: 2 additions & 11 deletions lib/src/commands/chat_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class ChatCommand
final List<RuntimeType<dynamic>> argumentTypes = [];

/// The arguments of [execute], in the order they appear.
final List<CommandArgument> arguments = [];
final List<ParameterData<dynamic>> arguments = [];

@override
final CommandOptions options;
Expand Down Expand Up @@ -374,16 +374,7 @@ class ChatCommand

// ignore: deprecated_member_use_from_same_package
argumentTypes.add(parameter.type);
arguments.add(
CommandArgument(
name: parameter.name,
isOptional: parameter.isOptional,
type: parameter.type,
description: parameter.description,
localizedDescriptions: parameter.localizedDescriptions,
localizedNames: parameter.localizedNames,
),
);
arguments.add(parameter);
}
}

Expand Down
30 changes: 0 additions & 30 deletions lib/src/util/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -649,33 +649,3 @@ Future<Permissions> computePermissions(

return computeOverwrites(await computeBasePermissions());
}

/// Represents a command argument.
class CommandArgument {
/// The name of this argument.
final String name;

/// The localized names of this argument.
final Map<Locale, String>? localizedNames;

/// The description of this argument.
final String? description;

/// The localized descriptions of this argument.
final Map<Locale, String>? localizedDescriptions;

/// The argument type.
final RuntimeType<dynamic>? type;

/// Whether this argument is optional.
final bool isOptional;

const CommandArgument({
required this.name,
required this.isOptional,
this.localizedNames,
this.description,
this.localizedDescriptions,
this.type,
});
}

0 comments on commit ce95467

Please sign in to comment.