The Messenger of Allah ﷺ said, "I have been considering ordering the call for prayer to be made, then commanding a man to lead the people in prayer, then setting out with some men carrying bundles of firewood to those who do not attend the prayer, and burning their houses down upon them with fire."
حدثنا عثمان بن أبي شيبة حدثنا أبو معاوية عن الأعمش عن أبي صالح
قال رسول الله ﷺ لقد هممت أن آمر بالصلاة فتقام ثم آمر رجلا فيصلي بالناس ثم أنطلق معي برجال معهم حزم من حطب إلى قوم لا يشهدون الصلاة فأحرق عليهم بيوتهم بالنار
Muslim narrated it in the Book of Mosques, chapter on the virtue of congregational prayer and the emphasis on the seriousness of missing it, etc., hadith no. 651, from the hadith of Abu Muawiya Dareer. Bukhari also narrated it, in the Book of Adhan, chapter on the virtue of praying Isha in congregation, hadith no. 657, from the hadith of Amash, through the same chain.