Sahih al-Bukhari, Book 64, Hadith 35 (Bukhari 3819)

Narrated Usaid:

On the day of Badr, Allah's Messenger (ﷺ) said to us, "When the enemy comes near to you, shoot at them but use your arrows sparingly (so that your arrows should not be wasted).