Electron donors are bases. In the case of aniline electron withdrawing phenyl group decreases electron density at nitrogen and as a result,it is less basic than ammonia. In the case of methylamine electron donating methyl group increases the electron density at nitrogen and therefore it is basic than ammonia.