Staple Through Electrical Wire
If you damaged the conductor, tape doesn't help. The sharp edges and reduced cross-section result in concentrated resistance, which creates heat. In a max-current scenario it could burn and arc. That means sparks and potentially fire. 

If you can determine that the conductors and their individual wire insulation weren't damaged, tape could be a viable (if not strictly legal) solution for repairing the outer jacket. Otherwise, replace the cable. You don't need an electrician to run a new cable between the fan and the switch box, for example.