sync method

Future<void> sync(
  1. List<MemberFlag> flags, {
  2. String? reason,
})

Implementation

Future<void> sync(List<MemberFlag> flags, {String? reason}) {
  final currentFlags = flags.fold(0, (acc, element) => acc + element.value);

  return _memberMethods.updateMember(
      serverId: server.id,
      memberId: member.id,
      payload: {'flags': currentFlags},
      reason: reason);
}