Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
darimi:3338Abū al-Walīd > Hammām > Qatādah > Ḥumayd b. ʿAbd al-Raḥman al-Ḥimyarī

[Machine] Divorce and wills are not permissible except in a state of sound mind, meaning not intoxicated. If someone is intoxicated, their divorce is permissible and they are to be struck on the back.  

الدارمي:٣٣٣٨حَدَّثَنَا أَبُو الْوَلِيدِ حَدَّثَنَا هَمَّامٌ عَنْ قَتَادَةَ عَنْ حُمَيْدِ بْنِ عَبْدِ الرَّحْمَنِ الْحِمْيَرِيِّ قَالَ

لَا يَجُوزُ طَلَاقٌ وَلَا وَصِيَّةٌ إِلَّا فِي عَقْلٍ إِلَّا النَّشْوَانَ يَعْنِي السَّكْرَانَ فَإِنَّهُ يَجُوزُ طَلَاقُهُ وَيُضْرَبُ ظَهْرُهُ