I think you need to brush up on your definition of an opioid, because I don’t see the comparison.
Opioids are a class of drugs naturally found in the opium poppy plant and that work in the brain to produce a variety of effects, including the relief of pain with many of these drugs.
Opioids can be prescription medications often referred to as painkillers, or they can be so-called street drugs, such as heroin.
Many prescription opioids are used to block pain signals between the brain and the body and are typically prescribed to treat moderate to severe pain. In addition to controlling pain, opioids can make some people feel relaxed, happy or “high,” and can be addictive. Additional side effects can include slowed breathing, constipation, nausea, confusion and drowsiness.