MemberManager.fromList constructor

MemberManager.fromList(
  1. List<Member> payload
)

Implementation

factory MemberManager.fromList(List<Member> payload) {
  final members =
      Map<Snowflake, Member>.from(payload.fold({}, (value, element) {
    return {...value, element.id: element};
  }));

  return MemberManager(members);
}