The Holy Quran commands Muslims to beware of even coming near to drinking or gambling, etc. as Satan wants only to excite enmity and hatred between them with intoxicants and gambling and hinder them from remembrance of God and from prayer. The following verses from the Holy Quran are relevant:
5.90. O you who believe! Intoxicants (all kinds of alcoholic drinks), gambling, Al-Ansab , and Al-Azlam (arrows for seeking luck or decision) are an abomination of Shaitan's (Satan) handiwork. So avoid (strictly all) that (abomination) in order that you may be successful .
5.91. Shaitan (Satan) wants only to excite enmity and hatred between you with intoxicants (alcoholic drinks) and gambling, and hinder you from the remembrance of Allah and from As-Salat (the prayer). So, will you not then abstain?
5.92. And obey Allah and the Messenger (Muhammad ), and beware (of even coming near to drinking or gambling or Al-Ansab, or Al-Azlam, etc.) and fear Allah. Then if you turn away, you should know that it is Our Messenger's duty to convey (the Message) in the clearest way.