The Messenger of Allah ﷺ said, "The fornicator is not a believer at the moment he commits fornication, the thief is not a believer at the moment he steals, and the drinker of wine is not a believer at the moment he drinks it."
قال رسول الله ﷺ: لا يزني الزاني حين يزني وهو مؤمن، ولا يسرق حين يسرق وهو مؤمن، ولا يشرب الخمر حين يشربها وهو مؤمن.
Bukhari narrated it in the Book of Drinks (5578) and Muslim in the Book of Faith (57), both from the hadith of Ibn Wahb, who said, Yunus informed me, from Ibn Shihab, who said, I heard Abu Salama bin Abdul-Rahman and Saeed bin Musayab both say, Abu Hurairah said, and he related it.