Anas bin Malik reported,

The Messenger of Allah ﷺ said, "When one of you supplicates, let him be resolute in his supplication and not say, 'O Allah, give me if You wish,' for nothing can compel Allah."

Muslim 6811

Sahih

حدثنا أبو بكر بن أبي شيبة وزهير بن حرب جميعا عن ابن علية قال أبو بكر حدثنا إسمعيل ابن علية عن عبد العزيز بن صهيب

عن أنس قال

قال رسول الله ﷺ إذا دعا أحدكم فليعزم في الدعاء ولا يقل اللهم إن شئت فأعطني فإن الله لا مستكره له

مسلم 6811صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Remembrance, supplication, Tawba, and seeking forgiveness
Chapter
Resolving in supplication and not saying "if You will"
Numbering
Darussalam 6811
Muslim 6811