when method

CommandBuilder when(
  1. bool condition, {
  2. String? then,
  3. List<String>? also,
  4. String? prefix,
  5. String? suffix,
  6. String? otherwise,
})

Implementation

CommandBuilder when(
  bool condition, {
  String? then,
  List<String>? also,
  String? prefix,
  String? suffix,
  String? otherwise,
}) =>
    string(
      condition ? then : otherwise,
      also: also,
      prefix: prefix,
      suffix: suffix,
    );