Abu Hurairah reported,

The Messenger of Allah ﷺ said, "O Allah, I take a covenant with You that You will never break with me. I am only a human being. So any believer whom I have hurt, or insulted, or lashed, or cursed, make that for him a prayer, a purification, and a means of nearness by which You bring him close on the Day of Resurrection."

Ahmad 8199

Sahih

وقال رسول الله ﷺ اللهم إني أتخذ عندك عهدا لن تخلفنيه إنما أنا بشر فأي المؤمنين آذيته أو شتمته أو جلدته أو لعنته فاجعلها له صلاة وزكاة وقربة تقربه بها يوم القيامة

أحمد 8199صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Hurairah
Numbering
Darussalam 8199
Ahmad 8199