Absorbents absorb toxic substances that cause infective diarrhea, methylcellulose is an absorbent as well.
Opioids classical use besides pain relief is use as an anti-diarrhea drug. Opioids have agonist actions on the intestinal opioid receptors, which when activated cause constipation, drugs such as morphine or codeine can be used to relief of diarrhea this way. A notable opioid for the purpose of relief of diarrhea is Loperamide which only is an agonist of the μ opioid receptors in the large intestine and does not have opioid affects in the central nervous system as it doesn't cross the blood brain barrier in significant amounts. This enables loperamide it to be used to the same benefit as other opioid drugs but without the CNS side effects or potential for abuse.