صحيح مسلم
From Sahih Muslim (Hadith 4360):
Anas reported that Allah's Messenger (ﷺ) pierced their eyes because they had pierced the eyes of the shepherds
Reference: Muslim 4360