copyWith method

BotCommand copyWith({
  1. String? command,
  2. String? description,
  3. bool? isEphemeral,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

BotCommand copyWith({
  String? command,
  String? description,
  bool? isEphemeral,
}) => BotCommand(
  command: command ?? this.command,
  description: description ?? this.description,
  isEphemeral: isEphemeral ?? this.isEphemeral,
);