It was recorded by al-Bukhārī (3207), Muslim (1/103-104), and Abū ʿAwānah (1/116) — and the context is his. Qatādah explicitly stated the narration in al-Bukhārī, and it is explicit that he was not asleep, but rather between sleep and wakefulness when the three men came to him and split open his chest — (ṣallá Allāhu ʿalayhi wa-sallam).
أخرجه البخاري (٣٢٠٧)، ومسلم (١/١٠٣-١٠٤)، وأبو عوانة (١/١١٦) - والسياق له-. وصرح قتادة بالتحديث عند البخاري، وهو صريح في أنه لم يكن نائماً، وإنما كان بين النائم واليقظان حينما جاءه ثلاثة النفر، وشقوا بطنه- ﷺ.
(I command you with four things, and forbid you from four: belief in Allāh, then he explained it to them, saying: the testimony that there is no deity but Allāh, and that Muḥammad is the Messenger of Allāh — and he gestured one —, establishing prayer, giving zakāh, and that you give a fifth of what you gain, and I forbid you from using gourds, jars, hollowed stumps, and coated vessels). It was recorded by al-Bukhārī (1/129/53- "Fatḥ al-Bārī"), Muslim (1/35), Abū Dāwūd (4/94/3692), al-Tirmidhī (2611), al-Nasāʾī (2/272), and al-Bayhaqī in "al-Sunan" (6/294-295 and 303) and in "Shuʿab al-Īmān" (1/50-51) and in "Dalāʾil al-Nubuwwah" (3/323-324), all from the route of Abū Jamrah from Ibn ʿAbbās who said: The delegation of ʿAbd al-Qays came to the Messenger of Allāh (ṣallá Allāhu ʿalayhi wa-sallam), and they said: O Messenger of Allāh! We are — this group — from Rabīʿah, and the disbelievers of Muḍar have come between us and you, so we cannot reach you except in the sacred month, so command us with something we can act upon and call those behind us to it? He said: ... and he mentioned it. It has a supporting narration from Abū Saʿīd al-Khudrī with a similar meaning. It was recorded by Muslim (1/36), and al-Bayhaqī in "Dalāʾil al-Nubuwwah" (5/326), and Aḥmad (3/22/23).
(آمُركُم بأربعٍ، وأنهاكُم عن أربعٍ:الإيمان بالله، ثمّ فسّرها لهم، فقال: شهادة أن لا إله إلا الله، وأن محمداً رسول الله- وعقدَ واحدةً-، وإقامِ الصلاةِ، وإيتاءِ الزكاةِ، وأن تؤدُّوا خُمُسَ ما غنمتُم، وأنهاكُم عن الدُّبّاء، والحنتََم، والنَّقِير، والمقيَّر). أخرجه البخاري (١/١٢٩/٥٣- "فتح الباري ") ، ومسلم (١/٣٥) ، وأبو داود (٤/٩٤/ ٣٦٩٢) ، والترمذي (٢٦١١) ، والنسائي (٢/٢٧٢) ، والبيهقي في "السنن " (٦/٢٩٤-٢٩٥و٣٠٣) وفي "شعب الإيمان " (١/ ٥٠- ٥١) وفي "دلائل النبوة" (٣/٣٢٣-٣٢٤) كلهم من طريق أبي جمرة عن ابن عباس قال:قدم وفد عبد القيس على رسول الله ﷺ، فقالوا: يا رسول الله! إنا- هذا الحي-: من ربيعة، وقد حالت بيننا وبينك كفار مضر، فلا نخلص إليك إلا في شهر الحرام، فمُرنا بأمر نعمل به، وندعو إليه من وراءنا؟ قال: ... فذكره. وله شاهد من حديث أبي سعيد الخدري بنحوه. أخرجه مسلم (١/٣٦) ، والبيهقي في "دلائل النبوة" (٥/٣٢٦) ، وأحمد (٣/٢٢/٢٣).