Inhaler for capsule and spray