getOther method

Message? getOther(
  1. List<Node> parts,
  2. List<String> arguments
)

Implementation

Message? getOther(List<Node> parts, List<String> arguments) {
  final other = parts
      .where((e) => e.children[0].type == ST.other)
      .map((e) => e.children.firstWhere((e) => e.type == ST.message))
      .map((e) => MessageParser.parseNode(e, arguments))
      .whereType<Message>();
  return other.isNotEmpty ? other.first : null;
}