On the day of Badr, when the captives were brought forward, the Messenger of Allah ﷺ asked, "What do you say concerning these captives?" He then mentioned a long story within this hadith.
حدثنا هناد حدثنا أبو معاوية عن الأعمش عن عمرو بن مرة عن أبي عبيدة
لما كان يوم بدر وجيء بالأسارى قال رسول الله ﷺ ما تقولون في هؤلاء الأسارى فذكر قصة في هذا الحديث طويلة
[Its chain is daif because of a break] and Ahmad narrated it: 383/1, 384, from Abu Muawiya Dareer with it at length, and it will come up later at 3084.Also on this topic, narrations from Umar [Muslim, no. 1763], Abu Ayub [I could not find it], Anas [Muslim, no. 1779], and Abu Hurairah [coming up at 2266, 2369].