The Prophet ﷺ said at the battle of Badr: When they come near you shoot arrows at them; and do not draw swords at them until they come near you.
قَالَ النَّبِيُّ ﷺ يَوْمَ بَدْرٍ إِذَا أَكْثَبُوكُمْ فَارْمُوهُمْ بِالنَّبْلِ وَلاَ تَسُلُّوا السُّيُوفَ حَتَّى يَغْشَوْكُمْ