Abdullah bin Abbas reported,

Thursday, and what a Thursday! The pain of the Messenger of Allah ﷺ grew severe, and he said, "Bring me writing materials so I may write for you a document after which you will never go astray."The people then disputed among themselves, though disputing in the presence of a prophet is not fitting. They said, "What is wrong with him? Is he speaking deliriously? Ask him to clarify."So they went back to question him, but he said, "Leave me alone. The state I am in is better than what you are calling me to."Then he gave them three instructions. He said, "Expel the polytheists from the Arabian Peninsula, and grant gifts to delegations as I used to grant them." And he remained silent about the third, or perhaps he said, "I have forgotten it."

Bukhari 4431

Sahih

حدثنا قتيبة حدثنا سفيان عن سليمان الأحول عن سعيد بن جبير قال قال

ابن عباس

يوم الخميس وما يوم الخميس اشتد برسول الله ﷺ وجعه فقال ائتوني أكتب لكم كتابا لن تضلوا بعده أبدا فتنازعوا ولا ينبغي عند نبي تنازع فقالوا ما شأنه أهجر استفهموه فذهبوا يردون عليه فقال دعوني فالذي أنا فيه خير مما تدعوني إليه وأوصاهم بثلاث قال أخرجوا المشركين من جزيرة العرب وأجيزوا الوفد بنحو ما كنت أجيزهم وسكت عن الثالثة أو قال فنسيتها

البخاري 4431صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Expeditions
Chapter
Illness of the Prophet ﷺ and his death
Numbering
Darussalam 4431
Bukhari 4431