diff --git a/assets/data/combinedDB.json b/assets/data/combinedDB.json index bb746fe11..dfeba30ee 100644 --- a/assets/data/combinedDB.json +++ b/assets/data/combinedDB.json @@ -1865,127 +1865,6 @@ } ] }, - { - "url": "https://psychonautwiki.org/wiki/2-Methyl-AP-237", - "name": "2-Methyl-AP-237", - "aliases": [ - "2-Methyl-AP-237", - "Apex", - "2-MAP" - ], - "aliasesStr": "2-Methyl-AP-237, Apex, 2-MAP", - "roas": [ - { - "name": "Oral", - "dosage": [ - { - "name": "Threshold", - "value": "10 mg" - }, - { - "name": "Light", - "value": "10-15 mg" - }, - { - "name": "Common", - "value": "15-20 mg" - }, - { - "name": "Strong", - "value": "20-25 mg" - }, - { - "name": "Heavy", - "value": "25 mg" - } - ], - "duration": [ - { - "name": "Comeup", - "value": "10-40 minutes" - }, - { - "name": "Onset", - "value": "5-15 minutes" - }, - { - "name": "Peak", - "value": "15-20 minutes" - }, - { - "name": "Offset", - "value": "5-60 minutes" - }, - { - "name": "Afterglow", - "value": "4-6 hours" - }, - { - "name": "Total", - "value": "4-6 hours" - } - ] - } - ], - "interactions": [ - { - "status": "Caution", - "name": "Substituted amphetamines" - }, - { - "status": "Caution", - "name": "MAOI" - }, - { - "status": "Caution", - "name": "Nitrous" - }, - { - "status": "Caution", - "name": "PCP" - }, - { - "status": "Dangerous", - "name": "Alcohol" - }, - { - "status": "Dangerous", - "name": "Benzodiazepines" - }, - { - "status": "Dangerous", - "name": "Cocaine" - }, - { - "status": "Dangerous", - "name": "Dextromethorphan" - }, - { - "status": "Dangerous", - "name": "GHB" - }, - { - "status": "Dangerous", - "name": "GBL" - }, - { - "status": "Dangerous", - "name": "Ketamine" - }, - { - "status": "Dangerous", - "name": "Methoxetamine" - }, - { - "status": "Dangerous", - "name": "Tramadol" - }, - { - "status": "Dangerous", - "name": "Grapefruit" - } - ] - }, { "url": "https://psychonautwiki.org/wiki/25B-NBOH", "name": "25B-NBOH", @@ -21037,6 +20916,409 @@ "chemical": [] } }, + { + "url": "https://psychonautwiki.org/wiki/DMT", + "name": "DMT", + "aliases": [ + "DMT", + "N,N-DMT", + "Dmitry", + "The Glory", + "The Spirit Molecule", + "n,n-dmt", + "dimethyltryptamine" + ], + "aliasesStr": "DMT, N,N-DMT, Dmitry, The Glory, The Spirit Molecule, n,n-dmt, dimethyltryptamine", + "summary": "A popular and powerful psychedelic, typically used in two ways; either it is vapourised for a short 'breakthrough' experience, or it is taken in combination with an enzyme inhibitor for a long, intense trip (this is also known as ayahuasca or pharmahuasca).", + "toxicity": [ + "extremely low toxicity" + ], + "addictionPotential": "non-addictive with a low abuse potential", + "tolerance": { + "full": "does not appear to occur", + "half": null, + "zero": null + }, + "crossTolerances": [ + "psychedelics" + ], + "roas": [ + { + "name": "Intravenous", + "dosage": [ + { + "name": "Threshold", + "value": "4 mg" + }, + { + "name": "Light", + "value": "4-10 mg" + }, + { + "name": "Common", + "value": "10-15 mg" + }, + { + "name": "Strong", + "value": "15-20 mg" + }, + { + "name": "Heavy", + "value": "20 mg" + } + ], + "duration": [ + { + "name": "Comeup", + "value": "70-100 seconds" + }, + { + "name": "Onset", + "value": "2-10 seconds" + }, + { + "name": "Peak", + "value": "2-5 minutes" + }, + { + "name": "Offset", + "value": "10-20 minutes" + }, + { + "name": "Total", + "value": "15-30 minutes" + } + ] + }, + { + "name": "Smoked", + "dosage": [ + { + "name": "Threshold", + "value": "2 mg" + }, + { + "name": "Light", + "value": "10-20 mg" + }, + { + "name": "Common", + "value": "20-40 mg" + }, + { + "name": "Strong", + "value": "40-60 mg" + }, + { + "name": "Heavy", + "value": "60 mg" + } + ], + "duration": [ + { + "name": "Comeup", + "value": "1-3 minutes" + }, + { + "name": "Onset", + "value": "20-40 seconds" + }, + { + "name": "Peak", + "value": "2-8 minutes" + }, + { + "name": "Offset", + "value": "1-6 minutes" + }, + { + "name": "Afterglow", + "value": "10-60 minutes" + }, + { + "name": "Total", + "value": "5-20 minutes" + }, + { + "name": "Duration", + "value": "3-10 minutes" + } + ] + }, + { + "name": "Insufflated", + "dosage": [ + { + "name": "Light", + "value": "10-25 mg", + "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." + }, + { + "name": "Common", + "value": "25-50 mg", + "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." + }, + { + "name": "Strong", + "value": "50-125 mg", + "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." + } + ], + "duration": [ + { + "name": "Onset", + "value": "3-5 minutes" + }, + { + "name": "Duration", + "value": "45-60 minutes" + } + ] + }, + { + "name": "Intravenous", + "dosage": [ + { + "name": "Threshold", + "value": "4 mg" + }, + { + "name": "Light", + "value": "4-10 mg" + }, + { + "name": "Common", + "value": "10-15 mg" + }, + { + "name": "Strong", + "value": "15-20 mg" + }, + { + "name": "Heavy", + "value": "20 mg" + } + ], + "duration": [ + { + "name": "Comeup", + "value": "70-100 seconds" + }, + { + "name": "Onset", + "value": "2-10 seconds" + }, + { + "name": "Peak", + "value": "2-5 minutes" + }, + { + "name": "Offset", + "value": "10-20 minutes" + }, + { + "name": "Total", + "value": "15-30 minutes" + } + ] + }, + { + "name": "Vapourized", + "dosage": [ + { + "name": "Threshold", + "value": "5-10 mg", + "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." + }, + { + "name": "Light", + "value": "10-15 mg", + "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." + }, + { + "name": "Common", + "value": "15-25 mg", + "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." + }, + { + "name": "Strong", + "value": "25-35 mg", + "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." + }, + { + "name": "Heavy", + "value": "35 mg", + "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." + } + ], + "duration": [ + { + "name": "Onset", + "value": "0-2 minutes" + }, + { + "name": "Duration", + "value": "3-10 minutes" + } + ] + } + ], + "interactions": [ + { + "status": "Low Risk & Synergy", + "name": "2c-t-x" + }, + { + "status": "Low Risk & Synergy", + "name": "2c-x" + }, + { + "status": "Low Risk & Synergy", + "name": "5-meo-xxt" + }, + { + "status": "Low Risk & Decrease", + "name": "alcohol" + }, + { + "status": "Caution", + "name": "amphetamines", + "note": "Stimulants increase anxiety levels and the risk of thought loops which can lead to negative experiences" + }, + { + "status": "Low Risk & Synergy", + "name": "amt" + }, + { + "status": "Low Risk & Decrease", + "name": "benzodiazepines" + }, + { + "status": "Low Risk & Decrease", + "name": "benzos" + }, + { + "status": "Low Risk & No Synergy", + "name": "caffeine" + }, + { + "status": "Caution", + "name": "cannabis", + "note": "Cannabis has an unexpectedly strong and somewhat unpredictable synergy with psychedelics." + }, + { + "status": "Caution", + "name": "cocaine", + "note": "Stimulants increase anxiety levels and the risk of thought loops which can lead to negative experiences" + }, + { + "status": "Low Risk & Synergy", + "name": "dox" + }, + { + "status": "Low Risk & Synergy", + "name": "dxm" + }, + { + "status": "Low Risk & Decrease", + "name": "ghb/gbl" + }, + { + "status": "Low Risk & Synergy", + "name": "ketamine" + }, + { + "status": "Dangerous", + "name": "lithium", + "note": "There is a large number of reports indicating a high seizure and psychosis risk from this combination.", + "sources": [ + { + "author": "Sandeep M Nayak, Natalie Gukasyan, Frederick S Barrett , Earth Erowid , Fire Erowid , Roland R Griffiths", + "title": "Classic Psychedelic Coadministration with Lithium, but Not Lamotrigine, is Associated with Seizures: An Analysis of Online Psychedelic Experience Reports", + "url": "https://pubmed.ncbi.nlm.nih.gov/34348413/" + }, + { + "author": "Erowid", + "title": "Erowid Interactions", + "url": "https://erowid.org/chemicals/lsd/lsd_interactions.shtml" + }, + { + "author": "freshboi88", + "title": "I Was Only on One Dose", + "url": "https://erowid.org/experiences/exp.php?ID=93681" + }, + { + "author": "YouWerentYouAnymore", + "title": "Brought My Worst Thoughts to Life", + "url": "https://erowid.org/experiences/exp.php?ID=110780" + }, + { + "author": "Otto Simonsson, Peper S. Hendricks, Richard Chambers, Walter Osika, Simon B. Goldberg", + "title": "Prevalence and associations of challenging, difficult or distressing experiences using classic psychedelics", + "url": "https://www.sciencedirect.com/science/article/pii/S0165032723000915" + } + ] + }, + { + "status": "Low Risk & Synergy", + "name": "lsd" + }, + { + "status": "Low Risk & Synergy", + "name": "maois" + }, + { + "status": "Low Risk & Synergy", + "name": "mdma" + }, + { + "status": "Low Risk & Synergy", + "name": "mescaline" + }, + { + "status": "Low Risk & Synergy", + "name": "mushrooms" + }, + { + "status": "Low Risk & Synergy", + "name": "mxe" + }, + { + "status": "Low Risk & Synergy", + "name": "nbomes" + }, + { + "status": "Low Risk & Synergy", + "name": "nitrous" + }, + { + "status": "Low Risk & No Synergy", + "name": "opioids" + }, + { + "status": "Low Risk & Synergy", + "name": "pcp" + }, + { + "status": "Low Risk & Decrease", + "name": "ssris" + }, + { + "status": "Unsafe", + "name": "tramadol", + "note": "Tramadol is well known to lower seizure threshold and psychedelics also cause occasional seizures." + } + ], + "experiencesUrl": "https://www.erowid.org/experiences/subs/exp_DMT.shtml", + "classes": { + "psychoactive": [ + "Psychedelic" + ], + "chemical": [ + "Common" + ] + } + }, { "url": "https://psychonautwiki.org/wiki/DMXE", "name": "DMXE", @@ -22905,10 +23187,6 @@ "status": "Unsafe", "name": "Cocaine" }, - { - "status": "Unsafe", - "name": "Bupropion" - }, { "status": "Dangerous", "name": "ΑMT" @@ -55641,263 +55919,6 @@ } ] }, - { - "name": "dmt", - "url": "https://wiki.tripsit.me/wiki/dmt", - "experiencesUrl": "https://www.erowid.org/experiences/subs/exp_DMT.shtml", - "aliases": [ - "n,n-dmt", - "dimethyltryptamine" - ], - "aliasesStr": "n,n-dmt, dimethyltryptamine", - "summary": "A popular and powerful psychedelic, typically used in two ways; either it is vapourised for a short 'breakthrough' experience, or it is taken in combination with an enzyme inhibitor for a long, intense trip (this is also known as ayahuasca or pharmahuasca).", - "classes": { - "psychoactive": [ - "Psychedelic" - ], - "chemical": [ - "Common" - ] - }, - "roas": [ - { - "name": "Insufflated", - "dosage": [ - { - "name": "Light", - "value": "10-25 mg", - "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." - }, - { - "name": "Common", - "value": "25-50 mg", - "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." - }, - { - "name": "Strong", - "value": "50-125 mg", - "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." - } - ], - "duration": [ - { - "name": "Onset", - "value": "3-5 minutes" - }, - { - "name": "Duration", - "value": "45-60 minutes" - } - ] - }, - { - "name": "Intravenous", - "dosage": [ - { - "name": "Light", - "value": "10-15 mg", - "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." - }, - { - "name": "Common", - "value": "15-25 mg", - "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." - }, - { - "name": "Strong", - "value": "25-40 mg", - "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." - } - ] - }, - { - "name": "Vapourized", - "dosage": [ - { - "name": "Threshold", - "value": "5-10 mg", - "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." - }, - { - "name": "Light", - "value": "10-15 mg", - "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." - }, - { - "name": "Common", - "value": "15-25 mg", - "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." - }, - { - "name": "Strong", - "value": "25-35 mg", - "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." - }, - { - "name": "Heavy", - "value": "35 mg", - "note": " NOTE: These figures are for 100% effective vaporization methods. Most methods are not 100% effective. Likelyhood of having a \"breakthrough\" experience increases with dose." - } - ], - "duration": [ - { - "name": "Onset", - "value": "0-2 minutes" - }, - { - "name": "Duration", - "value": "3-10 minutes" - } - ] - } - ], - "interactions": [ - { - "status": "Low Risk & Synergy", - "name": "2c-t-x" - }, - { - "status": "Low Risk & Synergy", - "name": "2c-x" - }, - { - "status": "Low Risk & Synergy", - "name": "5-meo-xxt" - }, - { - "status": "Low Risk & Decrease", - "name": "alcohol" - }, - { - "status": "Caution", - "name": "amphetamines", - "note": "Stimulants increase anxiety levels and the risk of thought loops which can lead to negative experiences" - }, - { - "status": "Low Risk & Synergy", - "name": "amt" - }, - { - "status": "Low Risk & Decrease", - "name": "benzodiazepines" - }, - { - "status": "Low Risk & Decrease", - "name": "benzos" - }, - { - "status": "Low Risk & No Synergy", - "name": "caffeine" - }, - { - "status": "Caution", - "name": "cannabis", - "note": "Cannabis has an unexpectedly strong and somewhat unpredictable synergy with psychedelics." - }, - { - "status": "Caution", - "name": "cocaine", - "note": "Stimulants increase anxiety levels and the risk of thought loops which can lead to negative experiences" - }, - { - "status": "Low Risk & Synergy", - "name": "dox" - }, - { - "status": "Low Risk & Synergy", - "name": "dxm" - }, - { - "status": "Low Risk & Decrease", - "name": "ghb/gbl" - }, - { - "status": "Low Risk & Synergy", - "name": "ketamine" - }, - { - "status": "Dangerous", - "name": "lithium", - "note": "There is a large number of reports indicating a high seizure and psychosis risk from this combination.", - "sources": [ - { - "author": "Sandeep M Nayak, Natalie Gukasyan, Frederick S Barrett , Earth Erowid , Fire Erowid , Roland R Griffiths", - "title": "Classic Psychedelic Coadministration with Lithium, but Not Lamotrigine, is Associated with Seizures: An Analysis of Online Psychedelic Experience Reports", - "url": "https://pubmed.ncbi.nlm.nih.gov/34348413/" - }, - { - "author": "Erowid", - "title": "Erowid Interactions", - "url": "https://erowid.org/chemicals/lsd/lsd_interactions.shtml" - }, - { - "author": "freshboi88", - "title": "I Was Only on One Dose", - "url": "https://erowid.org/experiences/exp.php?ID=93681" - }, - { - "author": "YouWerentYouAnymore", - "title": "Brought My Worst Thoughts to Life", - "url": "https://erowid.org/experiences/exp.php?ID=110780" - }, - { - "author": "Otto Simonsson, Peper S. Hendricks, Richard Chambers, Walter Osika, Simon B. Goldberg", - "title": "Prevalence and associations of challenging, difficult or distressing experiences using classic psychedelics", - "url": "https://www.sciencedirect.com/science/article/pii/S0165032723000915" - } - ] - }, - { - "status": "Low Risk & Synergy", - "name": "lsd" - }, - { - "status": "Low Risk & Synergy", - "name": "maois" - }, - { - "status": "Low Risk & Synergy", - "name": "mdma" - }, - { - "status": "Low Risk & Synergy", - "name": "mescaline" - }, - { - "status": "Low Risk & Synergy", - "name": "mushrooms" - }, - { - "status": "Low Risk & Synergy", - "name": "mxe" - }, - { - "status": "Low Risk & Synergy", - "name": "nbomes" - }, - { - "status": "Low Risk & Synergy", - "name": "nitrous" - }, - { - "status": "Low Risk & No Synergy", - "name": "opioids" - }, - { - "status": "Low Risk & Synergy", - "name": "pcp" - }, - { - "status": "Low Risk & Decrease", - "name": "ssris" - }, - { - "status": "Unsafe", - "name": "tramadol", - "note": "Tramadol is well known to lower seizure threshold and psychedelics also cause occasional seizures." - } - ] - }, { "name": "doet", "url": "https://wiki.tripsit.me/wiki/doet", diff --git a/assets/data/psychonautDB.json b/assets/data/psychonautDB.json index 8bed2afe7..428048ffb 100644 --- a/assets/data/psychonautDB.json +++ b/assets/data/psychonautDB.json @@ -1679,133 +1679,6 @@ "smoked": null } }, - { - "url": "https://psychonautwiki.org/wiki/2-Methyl-AP-237", - "name": "2-Methyl-AP-237", - "summary": "", - "addictionPotential": null, - "toxicity": null, - "crossTolerances": null, - "commonNames": [ - "2-Methyl-AP-237", - "Apex", - "2-MAP" - ], - "class": null, - "tolerance": null, - "uncertainInteractions": [ - { - "name": "Substituted amphetamines" - }, - { - "name": "MAOI" - }, - { - "name": "Nitrous" - }, - { - "name": "PCP" - } - ], - "unsafeInteractions": null, - "dangerousInteractions": [ - { - "name": "Alcohol" - }, - { - "name": "Benzodiazepines" - }, - { - "name": "Cocaine" - }, - { - "name": "Dextromethorphan" - }, - { - "name": "GHB" - }, - { - "name": "GBL" - }, - { - "name": "Ketamine" - }, - { - "name": "Methoxetamine" - }, - { - "name": "Tramadol" - }, - { - "name": "Grapefruit" - } - ], - "roa": { - "oral": { - "name": "oral", - "dose": { - "units": "mg", - "threshold": 10, - "heavy": 25, - "common": { - "min": 15, - "max": 20 - }, - "light": { - "min": 10, - "max": 15 - }, - "strong": { - "min": 20, - "max": 25 - } - }, - "duration": { - "afterglow": { - "min": 4, - "max": 6, - "units": "hours" - }, - "comeup": { - "min": 10, - "max": 40, - "units": "minutes" - }, - "duration": null, - "offset": { - "min": 5, - "max": 60, - "units": "minutes" - }, - "onset": { - "min": 5, - "max": 15, - "units": "minutes" - }, - "peak": { - "min": 15, - "max": 20, - "units": "minutes" - }, - "total": { - "min": 4, - "max": 6, - "units": "hours" - } - }, - "bioavailability": null - }, - "sublingual": null, - "buccal": null, - "insufflated": null, - "rectal": null, - "transdermal": null, - "subcutaneous": null, - "intramuscular": null, - "intravenous": null, - "smoked": null - } - }, { "url": "https://psychonautwiki.org/wiki/25B-NBOH", "name": "25B-NBOH", @@ -16066,6 +15939,170 @@ "smoked": null } }, + { + "url": "https://psychonautwiki.org/wiki/DMT", + "name": "DMT", + "summary": "", + "addictionPotential": "non-addictive with a low abuse potential", + "toxicity": [ + "extremely low toxicity" + ], + "crossTolerances": [ + "psychedelics" + ], + "commonNames": [ + "DMT", + "N,N-DMT", + "Dmitry", + "The Glory", + "The Spirit Molecule" + ], + "class": { + "chemical": [ + "Substituted tryptamines" + ], + "psychoactive": [ + "Psychedelic" + ] + }, + "tolerance": { + "full": "does not appear to occur", + "half": null, + "zero": null + }, + "uncertainInteractions": [ + { + "name": "Cannabis" + }, + { + "name": "Stimulants" + } + ], + "unsafeInteractions": [ + { + "name": "Tramadol" + } + ], + "dangerousInteractions": [ + { + "name": "Lithium" + } + ], + "roa": { + "oral": null, + "sublingual": null, + "buccal": null, + "insufflated": null, + "rectal": null, + "transdermal": null, + "subcutaneous": null, + "intramuscular": null, + "intravenous": { + "name": "intravenous", + "dose": { + "units": "mg", + "threshold": 4, + "heavy": 20, + "common": { + "min": 10, + "max": 15 + }, + "light": { + "min": 4, + "max": 10 + }, + "strong": { + "min": 15, + "max": 20 + } + }, + "duration": { + "afterglow": null, + "comeup": { + "min": 70, + "max": 100, + "units": "seconds" + }, + "duration": null, + "offset": { + "min": 10, + "max": 20, + "units": "minutes" + }, + "onset": { + "min": 2, + "max": 10, + "units": "seconds" + }, + "peak": { + "min": 2, + "max": 5, + "units": "minutes" + }, + "total": { + "min": 15, + "max": 30, + "units": "minutes" + } + }, + "bioavailability": null + }, + "smoked": { + "name": "smoked", + "dose": { + "units": "mg", + "threshold": 2, + "heavy": 60, + "common": { + "min": 20, + "max": 40 + }, + "light": { + "min": 10, + "max": 20 + }, + "strong": { + "min": 40, + "max": 60 + } + }, + "duration": { + "afterglow": { + "min": 10, + "max": 60, + "units": "minutes" + }, + "comeup": { + "min": 1, + "max": 3, + "units": "minutes" + }, + "duration": null, + "offset": { + "min": 1, + "max": 6, + "units": "minutes" + }, + "onset": { + "min": 20, + "max": 40, + "units": "seconds" + }, + "peak": { + "min": 2, + "max": 8, + "units": "minutes" + }, + "total": { + "min": 5, + "max": 20, + "units": "minutes" + } + }, + "bioavailability": null + } + } + }, { "url": "https://psychonautwiki.org/wiki/DMXE", "name": "DMXE", @@ -17503,9 +17540,6 @@ }, { "name": "Cocaine" - }, - { - "name": "Bupropion" } ], "dangerousInteractions": [ diff --git a/assets/data/tripsitCombos.json b/assets/data/tripsitCombos.json index 52d28021c..0a739e1f2 100644 --- a/assets/data/tripsitCombos.json +++ b/assets/data/tripsitCombos.json @@ -1,8 +1,5 @@ { "2c-t-x": { - "2c-t-x": { - "status": "Self" - }, "2c-x": { "status": "Caution" }, @@ -125,9 +122,6 @@ "2c-t-x": { "status": "Caution" }, - "2c-x": { - "status": "Self" - }, "5-meo-xxt": { "note": "The 5-MeO psychedelics can interact unpredictably to potentiate other psychedelics", "status": "Caution" @@ -251,9 +245,6 @@ "note": "The 5-MeO psychedelics can interact unpredictably to potentiate other psychedelics", "status": "Caution" }, - "5-meo-xxt": { - "status": "Self" - }, "alcohol": { "status": "Low Risk & Decrease" }, @@ -348,9 +339,6 @@ "5-meo-xxt": { "status": "Low Risk & Decrease" }, - "alcohol": { - "status": "Self" - }, "amphetamines": { "note": "Drinking on stimulants is risky because the sedative effects of the alcohol are reduced, and these are what the body uses to gauge drunkenness. This typically leads to excessive drinking with greatly reduced inhibitions, high risk of liver damage and increased dehydration. They will also allow you to drink past a point where you might normally pass out, increasing the risk. If you do decide to do this then you should set a limit of how much you will drink each hour and stick to it, bearing in mind that you will feel the alcohol and the stimulant less. Extended release formulations may severely impede sleep, further worsening the hangover.", "status": "Caution" @@ -455,9 +443,6 @@ "note": "Drinking on stimulants is risky because the sedative effects of the alcohol are reduced, and these are what the body uses to gauge drunkenness. This typically leads to excessive drinking with greatly reduced inhibitions, high risk of liver damage and increased dehydration. They will also allow you to drink past a point where you might normally pass out, increasing the risk. If you do decide to do this then you should set a limit of how much you will drink each hour and stick to it, bearing in mind that you will feel the alcohol and the stimulant less. Extended release formulations may severely impede sleep, further worsening the hangover.", "status": "Caution" }, - "amphetamines": { - "status": "Self" - }, "amt": { "status": "Dangerous" }, @@ -578,9 +563,6 @@ "amphetamines": { "status": "Dangerous" }, - "amt": { - "status": "Self" - }, "benzodiazepines": { "status": "Low Risk & Decrease" }, @@ -670,9 +652,6 @@ "amt": { "status": "Low Risk & Decrease" }, - "benzodiazepines": { - "status": "Self" - }, "caffeine": { "status": "Low Risk & Decrease" }, @@ -768,9 +747,6 @@ "benzodiazepines": { "status": "Low Risk & Decrease" }, - "caffeine": { - "status": "Self" - }, "cannabis": { "status": "Low Risk & No Synergy" }, @@ -869,9 +845,6 @@ "caffeine": { "status": "Low Risk & No Synergy" }, - "cannabis": { - "status": "Self" - }, "cocaine": { "note": "Stimulants increase anxiety levels and the risk of thought loops which can lead to negative experiences", "status": "Caution" @@ -970,9 +943,6 @@ "note": "Stimulants increase anxiety levels and the risk of thought loops which can lead to negative experiences", "status": "Caution" }, - "cocaine": { - "status": "Self" - }, "dmt": { "note": "Stimulants increase anxiety levels and the risk of thought loops which can lead to negative experiences", "status": "Caution" @@ -1075,9 +1045,6 @@ "note": "Stimulants increase anxiety levels and the risk of thought loops which can lead to negative experiences", "status": "Caution" }, - "dmt": { - "status": "Self" - }, "dox": { "status": "Low Risk & Synergy" }, @@ -1199,9 +1166,6 @@ "dmt": { "status": "Low Risk & Synergy" }, - "dox": { - "status": "Self" - }, "dxm": { "note": "The DOx class as psychedelic stimulants have the potential to mask the effects of DXM and could lead to redosing to an unsafe level. DXM can also potentiate DOx resulting in an unpleasantly intense experience.", "status": "Unsafe" @@ -1331,9 +1295,6 @@ "note": "The DOx class as psychedelic stimulants have the potential to mask the effects of DXM and could lead to redosing to an unsafe level. DXM can also potentiate DOx resulting in an unpleasantly intense experience.", "status": "Unsafe" }, - "dxm": { - "status": "Self" - }, "ghb/gbl": { "note": "Both substances cause ataxia and bring a risk of vomiting and unconsciousness. If the patient falls unconscious while under the influence there is a severe risk of vomit aspiration if they are not placed in the recovery position. This combination is hard to predict", "status": "Dangerous" @@ -1439,9 +1400,6 @@ "note": "Both substances cause ataxia and bring a risk of vomiting and unconsciousness. If the patient falls unconscious while under the influence there is a severe risk of vomit aspiration if they are not placed in the recovery position. This combination is hard to predict", "status": "Dangerous" }, - "ghb/gbl": { - "status": "Self" - }, "ketamine": { "note": "Both substances cause ataxia and bring a risk of vomiting and unconsciousness. If the user falls unconscious while under the influence there is a severe risk of vomit aspiration if they are not placed in the recovery position.", "status": "Dangerous" @@ -1552,9 +1510,6 @@ "note": "Both substances cause ataxia and bring a risk of vomiting and unconsciousness. If the user falls unconscious while under the influence there is a severe risk of vomit aspiration if they are not placed in the recovery position.", "status": "Dangerous" }, - "ketamine": { - "status": "Self" - }, "lsd": { "status": "Low Risk & Synergy" }, @@ -1962,9 +1917,6 @@ ], "status": "Dangerous" }, - "lsd": { - "status": "Self" - }, "maois": { "status": "Low Risk & Decrease" }, @@ -2058,9 +2010,6 @@ "lsd": { "status": "Low Risk & Decrease" }, - "maois": { - "status": "Self" - }, "mdma": { "note": "MAO-B inhibitors can increase the potency and duration of phenethylamines unpredictably. MAO-A inhibitors with MDMA will lead to hypertensive crises.", "status": "Dangerous" @@ -2202,9 +2151,6 @@ "note": "MAO-B inhibitors can increase the potency and duration of phenethylamines unpredictably. MAO-A inhibitors with MDMA will lead to hypertensive crises.", "status": "Dangerous" }, - "mdma": { - "status": "Self" - }, "mescaline": { "status": "Low Risk & Synergy" }, @@ -2327,9 +2273,6 @@ "mdma": { "status": "Low Risk & Synergy" }, - "mescaline": { - "status": "Self" - }, "mushrooms": { "status": "Low Risk & Synergy" }, @@ -2448,9 +2391,6 @@ "mescaline": { "status": "Low Risk & Synergy" }, - "mushrooms": { - "status": "Self" - }, "mxe": { "status": "Low Risk & Synergy" }, @@ -2545,9 +2485,6 @@ "mushrooms": { "status": "Low Risk & Synergy" }, - "mxe": { - "status": "Self" - }, "nbomes": { "note": "As an NMDA antagonist MXE potentiates NBOMes which can be unpleasantly intense", "status": "Caution" @@ -2673,9 +2610,6 @@ "note": "As an NMDA antagonist MXE potentiates NBOMes which can be unpleasantly intense", "status": "Caution" }, - "nbomes": { - "status": "Self" - }, "nitrous": { "status": "Low Risk & Synergy" }, @@ -2773,9 +2707,6 @@ "nbomes": { "status": "Low Risk & Synergy" }, - "nitrous": { - "status": "Self" - }, "opioids": { "note": "Both substances potentiate the ataxia and sedation caused by the other and can lead to unexpected loss of consciousness at high doses. While unconscious, vomit aspiration is a risk if not placed in the recovery position. Memory blackouts are likely.", "status": "Caution" @@ -2874,9 +2805,6 @@ "note": "Both substances potentiate the ataxia and sedation caused by the other and can lead to unexpected loss of consciousness at high doses. While unconscious, vomit aspiration is a risk if not placed in the recovery position. Memory blackouts are likely.", "status": "Caution" }, - "opioids": { - "status": "Self" - }, "pcp": { "note": "PCP can reduce opioid tolerance, increasing the risk of overdose", "status": "Caution" @@ -2974,9 +2902,6 @@ "note": "PCP can reduce opioid tolerance, increasing the risk of overdose", "status": "Caution" }, - "pcp": { - "status": "Self" - }, "ssris": { "note": "Details of this combination are not well understood but PCP generally interacts in an unpredictable manner.", "status": "Unsafe" @@ -3067,9 +2992,6 @@ "note": "Details of this combination are not well understood but PCP generally interacts in an unpredictable manner.", "status": "Unsafe" }, - "ssris": { - "status": "Self" - }, "tramadol": { "status": "Dangerous" } @@ -3167,9 +3089,6 @@ }, "ssris": { "status": "Dangerous" - }, - "tramadol": { - "status": "Self" } } } \ No newline at end of file diff --git a/src/discord/commands/global/d.about.ts b/src/discord/commands/global/d.about.ts deleted file mode 100644 index b9590157a..000000000 --- a/src/discord/commands/global/d.about.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { - SlashCommandBuilder, - Colors, -} from 'discord.js'; -import { SlashCommand } from '../../@types/commandDef'; -import { embedTemplate } from '../../utils/embedTemplate'; -import { about } from '../../../global/commands/g.about'; -import commandContext from '../../utils/context'; - -const F = f(__filename); - -export const dAbout: SlashCommand = { - data: new SlashCommandBuilder() - .setName('about') - .setDescription('Shows information about this bot!') - .addBooleanOption(option => option.setName('ephemeral') - .setDescription('Set to "True" to show the response only to you')), - async execute(interaction) { - log.info(F, await commandContext(interaction)); - await interaction.deferReply({ ephemeral: (interaction.options.getBoolean('ephemeral') === true) }); - const tripsitInfo = await about(); - const embed = embedTemplate() - .setColor(Colors.DarkBlue) - .setTitle('About TripBot') - .setURL('https://tripsit.me/about/') - .setDescription(tripsitInfo.description) - .addFields( - { - name: 'Invite', - value: tripsitInfo.invite, - }, - { - name: 'Disclaimer', - value: tripsitInfo.disclaimer, - }, - { - name: 'Support TripSit', - value: tripsitInfo.support, - }, - { - name: 'Feedback', - value: tripsitInfo.feedback, - }, - { - name: 'Credits', - value: tripsitInfo.credits, - }, - ); - await interaction.editReply({ embeds: [embed] }); - return true; - }, -}; - -export default dAbout; diff --git a/src/discord/commands/global/d.contact.ts b/src/discord/commands/global/d.contact.ts deleted file mode 100644 index 137e72a23..000000000 --- a/src/discord/commands/global/d.contact.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { - Colors, - SlashCommandBuilder, -} from 'discord.js'; -import { stripIndents } from 'common-tags'; -import { SlashCommand } from '../../@types/commandDef'; -import { embedTemplate } from '../../utils/embedTemplate'; -import { contact } from '../../../global/commands/g.contact'; -import commandContext from '../../utils/context'; -// import log from '../../../global/utils/log'; - -const F = f(__filename); - -export const dContact: SlashCommand = { - data: new SlashCommandBuilder() - .setName('contact') - .setDescription('How to contact TripSit!') - .addBooleanOption(option => option.setName('ephemeral') - .setDescription('Set to "True" to show the response only to you')), - - async execute(interaction) { - log.info(F, await commandContext(interaction)); - await interaction.deferReply({ ephemeral: (interaction.options.getBoolean('ephemeral') === true) }); - const contactInfo = await contact(); - const embed = embedTemplate() - .setColor(Colors.Purple) - .setTitle('Contact TripSit') - .setURL(contactInfo.url) - .setDescription( - stripIndents`The best way to get in contact with TeamTripsit the Discord via the link below! - If you have a problem with the bot, join the discord and talk to ${contactInfo.botOwner}! - Or you can use /bug to report a bug, or you can DM the bot to submit feedback!`, - ) - .addFields( - { name: 'Discord', value: `[Join our discord](${contactInfo.discord})`, inline: true }, - // {name: 'Webchat', value: `[Webchat](${contactInfo.discord})`}, - { name: 'Bot Issues Email', value: `${contactInfo.botEmail}`, inline: true }, - { name: 'Drug Info Issues Email', value: `${contactInfo.contentEmail}`, inline: true }, - ) - .setFooter({ text: 'Thanks for asking!' }); - await interaction.editReply({ embeds: [embed] }); - return true; - }, -}; - -export default dContact; diff --git a/src/discord/commands/global/d.donate.ts b/src/discord/commands/global/d.donate.ts deleted file mode 100644 index 892ca3e01..000000000 --- a/src/discord/commands/global/d.donate.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { - SlashCommandBuilder, - ChatInputCommandInteraction, - Colors, -} from 'discord.js'; -import { stripIndents } from 'common-tags'; -import { SlashCommand } from '../../@types/commandDef'; -import { embedTemplate } from '../../utils/embedTemplate'; -import { donate } from '../../../global/commands/g.donate'; -import commandContext from '../../utils/context'; -// import log from '../../../global/utils/log'; - -const F = f(__filename); - -export const dDonate: SlashCommand = { - data: new SlashCommandBuilder() - .setName('donate') - .setDescription('Shows different ways to support TripSit!') - .addBooleanOption(option => option.setName('ephemeral') - .setDescription('Set to "True" to show the response only to you')), - - async execute(interaction:ChatInputCommandInteraction) { - log.info(F, await commandContext(interaction)); - await interaction.deferReply({ ephemeral: (interaction.options.getBoolean('ephemeral') === true) }); - const donateInfo = await donate(); - const embed = embedTemplate() - .setColor(Colors.Purple) - .setTitle('🚀 **TripSit\'s Donation Info!** 🚀') - .setURL('https://tripsit.me/donate/') - .setDescription(stripIndents` - At TripSit, we're all about harm reduction, and we'll never charge for our services or hide information behind paywalls or annoying ads. Our mission is to help anyone who needs it, no strings attached. 🌟 - - But we can't pay for servers with good intentions alone, so your support means the world to us. - - There are two awesome ways to contribute: - - 1️⃣ **Patreon Subscription** - For as little as $1 a month, you can become a patron and keep supporting the good cause. 🌈 - - 2️⃣ **Ko-Fi Donation** - If that isn't your style, you can give a one-time boost to our cause through Ko-Fi. ☕ - - 🎁 What's in it for you? Well, we've got some fantastic benefits for our supporters: - - - 📣 **Announcement**: We'll tell the guild you've made a difference in #vip-lounge. - - 🪙 **Gold Lounge Access**: Gain entry to our exclusive donor space, #gold-lounge. - - 🌈 **Special Donor Colors**: Deck out your Discord persona with unique colors. - - 💎 **Supporter Role (Patreon)**: Be shown at the top of the member list with a unique icon. - - 🎉 More surprises are in the works! Your suggestions are welcome. - - These are **permanent** benefits, excluding the Supporter role, which is only for active Patreons. - - No spare change? Boosting our server will also give you donor perks while your boost is active! - - Your donations directly fuel our server costs, ensuring TripSit keeps doing what we do best. 🌐 With enough support, we can even expand and provide new services – who's up for a Minecraft server? 😎 - - Thank you for being a part of our journey, and for helping make the world a safer place! 💕 - `); - // for (const entry of donateInfo) { - donateInfo.forEach(entry => { - if (entry.value.length > 0) { - const hyperlink = `[Website](${entry.value})`; - embed.addFields( - { - name: entry.name, - value: `${entry.value !== '\u200B' ? hyperlink : entry.value}`, - inline: true, - }, - ); - } - }); - await interaction.editReply({ embeds: [embed] }); - return true; - }, -}; - -export default dDonate; diff --git a/src/discord/commands/global/d.feedback.ts b/src/discord/commands/global/d.feedback.ts index f2779fb76..1755d091a 100644 --- a/src/discord/commands/global/d.feedback.ts +++ b/src/discord/commands/global/d.feedback.ts @@ -6,77 +6,89 @@ import { SlashCommandBuilder, TextChannel, ModalSubmitInteraction, + ChatInputCommandInteraction, + ButtonInteraction, } from 'discord.js'; import { TextInputStyle, } from 'discord-api-types/v10'; +import { stripIndents } from 'common-tags'; import { SlashCommand } from '../../@types/commandDef'; import commandContext from '../../utils/context'; import { embedTemplate } from '../../utils/embedTemplate'; +import tripsitInfo from '../../../global/commands/g.about'; const F = f(__filename); +export async function feedbackReportModal( + interaction:ChatInputCommandInteraction | ButtonInteraction, +) { + await interaction.showModal( + new ModalBuilder() + .setCustomId(`feedbackReportModal~${interaction.id}`) + .setTitle('TripBot Feedback Report') + .addComponents( + new ActionRowBuilder() + .addComponents( + new TextInputBuilder() + .setCustomId('feedbackReport') + .setLabel('What would you like to tell the bot dev team?') + .setStyle(TextInputStyle.Paragraph), + ), + ), + ); + + const filter = (i:ModalSubmitInteraction) => i.customId.includes('feedbackReportModal'); + // log.debug(F, 'Showing the modal'); + interaction.awaitModalSubmit({ filter, time: 0 }) + .then(async i => { + // log.debug(F, 'Modal submit interaction received'); + if (i.customId.split('~')[1] !== interaction.id) return; + await i.deferReply({ ephemeral: true }); + const guildName = ` in ${i.guild?.name}`; + const guildMessage = `${i.guild ? guildName : 'DM'}`; + + const feedbackReport = i.fields.getTextInputValue('feedbackReport'); + + const botOwner = await i.client.users.fetch(env.DISCORD_OWNER_ID); + const botOwnerEmbed = embedTemplate() + .setColor(Colors.Purple) + .setDescription(`Hey ${botOwner.toString()},\n${i.user.tag}${guildMessage} reports:\n${feedbackReport}`); + await botOwner.send({ embeds: [botOwnerEmbed] }); + + const tripsitGuild = await i.client.guilds.fetch(env.DISCORD_GUILD_ID); + tripsitGuild.roles.fetch(); + const developerRole = await tripsitGuild.roles.fetch(env.ROLE_DEVELOPER); + if (!developerRole) { + log.error(F, 'Developer role not found!'); + return; + } + const devChan = await i.client.channels.fetch(env.CHANNEL_TRIPBOT) as TextChannel; + if (!devChan) { + log.error(F, 'Developer channel not found!'); + return; + } + await devChan.send(`Hey ${developerRole.toString()}, a user submitted a feedback report:\n${feedbackReport}`); + + const embed = embedTemplate() + .setColor(Colors.Purple) + .setTitle('Thank you!') + // eslint-disable-next-line max-len + .setDescription(stripIndents` + Thank you! I\'ve submitted this feedback to Moonbear. + + You\'re more than welcome to join the [TripSit server](${tripsitInfo.discord}) if you want!`); + await i.editReply({ embeds: [embed] }); + }); + // log.debug(F, 'Modal submit interaction listener set up'); +} export const dFeedback: SlashCommand = { data: new SlashCommandBuilder() .setName('feedback') .setDescription('Share feedback or report a bug to the TripBot dev team!'), async execute(interaction) { log.info(F, await commandContext(interaction)); - await interaction.showModal( - new ModalBuilder() - .setCustomId(`feedbackReportModal~${interaction.id}`) - .setTitle('TripBot Feedback Report') - .addComponents( - new ActionRowBuilder() - .addComponents( - new TextInputBuilder() - .setCustomId('feedbackReport') - .setLabel('What would you like to tell the bot dev team?') - .setStyle(TextInputStyle.Paragraph), - ), - ), - ); - - const filter = (i:ModalSubmitInteraction) => i.customId.includes('feedbackReportModal'); - // log.debug(F, 'Showing the modal'); - interaction.awaitModalSubmit({ filter, time: 0 }) - .then(async i => { - // log.debug(F, 'Modal submit interaction received'); - if (i.customId.split('~')[1] !== interaction.id) return; - await i.deferReply({ ephemeral: true }); - const guildName = ` in ${i.guild?.name}`; - const guildMessage = `${i.guild ? guildName : 'DM'}`; - - const feedbackReport = i.fields.getTextInputValue('feedbackReport'); - - const botOwner = await i.client.users.fetch(env.DISCORD_OWNER_ID); - const botOwnerEmbed = embedTemplate() - .setColor(Colors.Purple) - .setDescription(`Hey ${botOwner.toString()},\n${i.user.tag}${guildMessage} reports:\n${feedbackReport}`); - await botOwner.send({ embeds: [botOwnerEmbed] }); - - const tripsitGuild = await i.client.guilds.fetch(env.DISCORD_GUILD_ID); - tripsitGuild.roles.fetch(); - const developerRole = await tripsitGuild.roles.fetch(env.ROLE_DEVELOPER); - if (!developerRole) { - log.error(F, 'Developer role not found!'); - return; - } - const devChan = await i.client.channels.fetch(env.CHANNEL_TRIPBOT) as TextChannel; - if (!devChan) { - log.error(F, 'Developer channel not found!'); - return; - } - await devChan.send(`Hey ${developerRole.toString()}, a user submitted a feedback report:\n${feedbackReport}`); - - const embed = embedTemplate() - .setColor(Colors.Purple) - .setTitle('Thank you!') - // eslint-disable-next-line max-len - .setDescription('I\'ve submitted this feedback to the bot owner. \n\nYou\'re more than welcome to join the TripSit server and speak to Moonbear directly if you want! Check the /contact command for more info.'); - await i.editReply({ embeds: [embed] }); - }); - // log.debug(F, 'Modal submit interaction listener set up'); + await feedbackReportModal(interaction); return true; }, }; diff --git a/src/discord/commands/global/d.help copy.ts b/src/discord/commands/global/d.help copy.ts deleted file mode 100644 index 4e1563ab6..000000000 --- a/src/discord/commands/global/d.help copy.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* eslint-disable max-len */ -import { - ActionRowBuilder, - ButtonBuilder, - ButtonInteraction, - ButtonStyle, - InteractionEditReplyOptions, - SlashCommandBuilder, -} from 'discord.js'; -import { stripIndents } from 'common-tags'; -import { SlashCommand } from '../../@types/commandDef'; -import { embedTemplate } from '../../utils/embedTemplate'; -import commandContext from '../../utils/context'; -import { botStats } from '../../../global/commands/g.botstats'; - -const F = f(__filename); - -const startButton = new ButtonBuilder() - .setCustomId('helpButton~Start') - .setLabel('Home') - .setStyle(ButtonStyle.Danger); - -const hrButton = new ButtonBuilder() - .setCustomId('helpButton~HarmReduction') - .setLabel('Harm Reduction Modules') - .setStyle(ButtonStyle.Danger); - -const funButton = new ButtonBuilder() - .setCustomId('helpButton~Fun') - .setLabel('Other Modules') - .setStyle(ButtonStyle.Success); - -const tripsitButton = new ButtonBuilder() - .setCustomId('helpButton~TripSit') - .setLabel('Tripsit-Only Modules') - .setStyle(ButtonStyle.Primary); - -async function startEmbedBuilder():Promise { - const statData = await botStats(); - return { - embeds: [ - embedTemplate() - .setTitle('Welcome to TripSit\'s TripBot') - .setDescription(stripIndents` - TripBot is an omni-bot that does a bit of everything, and is one of the only bots on the TripSit discord guild. - - It currently has ${statData.commandCount} commands, and of those, it has a couple main features: - - * You can set up a channel to host a TripSit sessions, like a support ticket system but for TripSitting. - * It has an AI chatbot that you can talk to, and it will respond to you, using OpenAI GPT-3.5. - * It has a bunch of other features, like a calculator, a harm reduction database, and a bunch of other stuff. - - Features are grouped into categories, and you can use the buttons below to navigate between them. - - Some important things to remember: - * Use /feedback to send feedback directly to the bot owner, <@!${process.env.OWNER_ID}>. - * Use /about to see attribution info - * Use /donate to see different ways to support TripSit/TripBot. - `) - .setFooter({ text: 'TripBot is not a medical professional. If you are experiencing a medical emergency, please call 911 or your local emergency number.' }), - ], - components: [new ActionRowBuilder().addComponents([ - hrButton, - funButton, - tripsitButton, - ])], - }; -} - -async function hrEmbedBuilder():Promise { - // embed.addFields({ name: 'Drug', value: getDesc('drug') ?? '', inline: true }); - // embed.addFields({ name: 'Combo', value: getDesc('drug') ?? '', inline: true }); - // embed.addFields({ name: 'iDose', value: getDesc('idose') ?? '', inline: true }); - // embed.addFields({ name: 'ComboChart', value: getDesc('drug') ?? '', inline: true }); - // embed.addFields({ name: 'Reagents', value: getDesc('drug') ?? '', inline: true }); - // embed.addFields({ name: 'Calc Psychedelics', value: getDesc('calc_psychedelics') ?? '', inline: true }); - // embed.addFields({ name: 'Calc DXM', value: getDesc('calc_dxm') ?? '', inline: true }); - // embed.addFields({ name: 'Calc Benzos', value: getDesc('calc_benzo') ?? '', inline: true }); - // embed.addFields({ name: 'Calc Ketamine', value: getDesc('calc_ketamine') ?? '', inline: true }); - // embed.addFields({ name: 'Recovery', value: getDesc('recovery') ?? '', inline: true }); - // embed.addFields({ name: 'Breathe', value: getDesc('breathe') ?? '', inline: true }); - // embed.addFields({ name: 'Warmline', value: getDesc('warmline') ?? '', inline: true }); - // embed.addFields({ name: 'KIPP', value: getDesc('kipp') ?? '', inline: true }); - // embed.addFields({ name: 'Hydrate', value: getDesc('hydrate') ?? '', inline: true }); - // embed.addFields({ name: 'Crisis', value: getDesc('crisis') ?? '', inline: true }); - return { - embeds: [ - embedTemplate() - .setTitle('Harm Reduction Modules') - .setDescription(stripIndents` - These commands are for harm reduction purposes only, and are not intended to replace the advice of a medical professional. - - Harm reduction is a set of practical strategies and ideas aimed at reducing negative consequences associated with drug use. Harm Reduction is also a movement for social justice built on a belief in, and respect for, the rights of people who use drugs. - - # Drug - Display - - `), - ], - components: [new ActionRowBuilder().addComponents([ - startButton, - funButton, - tripsitButton, - ])], - }; -} - -async function funEmbedBuilder():Promise { - // embed.addFields({ name: 'About', value: getDesc('about') ?? '', inline: true }); - // embed.addFields({ name: 'Contact', value: getDesc('contact') ?? '', inline: true }); - // embed.addFields({ name: 'Feedback', value: getDesc('feedback') ?? '', inline: true }); - // embed.addFields({ name: 'Triptoys', value: getDesc('triptoys') ?? '', inline: true }); - // embed.addFields({ name: 'Imgur', value: getDesc('imgur') ?? '', inline: true }); - // embed.addFields({ name: 'Magick8Ball', value: getDesc('magick8ball') ?? '', inline: true }); - // embed.addFields({ name: 'Urban Define', value: getDesc('urban_define') ?? '', inline: true }); - // embed.addFields({ name: 'Topic', value: getDesc('topic') ?? '', inline: true }); - // embed.addFields({ name: 'Joke', value: getDesc('joke') ?? '', inline: true }); - // embed.addFields({ name: 'Youtube', value: getDesc('youtube') ?? '', inline: true }); - // embed.addFields({ name: 'Coinflip', value: getDesc('coinflip') ?? '', inline: true }); - // embed.addFields({ name: 'Lovebomb', value: getDesc('lovebomb') ?? '', inline: true }); - // embed.addFields({ name: 'Remindme', value: getDesc('remind_me') ?? '', inline: true }); - // embed.addFields({ name: 'Convert', value: getDesc('convert') ?? '', inline: true }); - // embed.addFields({ name: 'Poll', value: getDesc('poll') ?? '', inline: true }); - // funEmbed.addFields({name: 'Youtube', value: getDesc('youtube'), inline: true}); - - return { - embeds: [ - embedTemplate() - .setTitle('Fun Modules') - .setDescription('These commands are for fun and general use.'), - ], - components: [new ActionRowBuilder().addComponents([ - startButton, - hrButton, - tripsitButton, - ])], - }; -} - -async function tripsitEmbedBuilder():Promise { - // embed.addFields({ name: 'TripSit', value: getDesc('tripsit'), inline: true }); - // embed.addFields({ name: 'Clearchat', value: getDesc('clear-chat') ?? '', inline: true }); - // embed.addFields({ name: 'Birthday', value: getDesc('birthday') ?? '', inline: true }); - // embed.addFields({ name: 'Timezone', value: getDesc('timezone') ?? '', inline: true }); - // embed.addFields({ name: 'Profile', value: getDesc('profile') ?? '', inline: true }); - // embed.addFields({ name: 'Moderate', value: getDesc('mod') ?? '', inline: true }); - // embed.addFields({ name: 'Report', value: getDesc('report') ?? '', inline: true }); - - return { - embeds: [ - embedTemplate() - .setTitle('TripSit Specific Modules') - .setDescription('These commands are only available in TripSit\'s Discord server.'), - ], - components: [new ActionRowBuilder().addComponents([ - startButton, - hrButton, - funButton, - ])], - }; -} - -export async function helpButton( - interaction: ButtonInteraction, -) { - const [, category] = interaction.customId.split('~'); - log.info(F, await commandContext(interaction)); - switch (category) { - case 'Start': - await interaction.update(await startEmbedBuilder()); - break; - case 'HarmReduction': - await interaction.update(await hrEmbedBuilder()); - break; - case 'Fun': - await interaction.update(await funEmbedBuilder()); - break; - case 'TripSit': - await interaction.update(await tripsitEmbedBuilder()); - break; - default: - await interaction.update(await startEmbedBuilder()); - break; - } -} - -export const dHelp: SlashCommand = { - data: new SlashCommandBuilder() - .setName('help') - .setDescription('Information about TripBot Commands') - .addBooleanOption(option => option.setName('ephemeral') - .setDescription('Set to "True" to show the response only to you')), - - async execute(interaction) { - log.info(F, await commandContext(interaction)); - await interaction.deferReply({ ephemeral: (interaction.options.getBoolean('ephemeral') === true) }); - await interaction.editReply(await startEmbedBuilder()); - return true; - }, -}; - -export default dHelp; diff --git a/src/discord/commands/global/d.help.ts b/src/discord/commands/global/d.help.ts index 331b7c933..ea66b0be8 100644 --- a/src/discord/commands/global/d.help.ts +++ b/src/discord/commands/global/d.help.ts @@ -1,14 +1,613 @@ /* eslint-disable max-len */ import { + ActionRowBuilder, + ButtonBuilder, + ButtonStyle, + Colors, + InteractionEditReplyOptions, SlashCommandBuilder, + StringSelectMenuBuilder, + StringSelectMenuInteraction, } from 'discord.js'; +import { stripIndents } from 'common-tags'; import { SlashCommand } from '../../@types/commandDef'; import { embedTemplate } from '../../utils/embedTemplate'; import commandContext from '../../utils/context'; -import { paginationEmbed } from '../../utils/pagination'; +import tripsit from '../../../global/commands/g.about'; const F = f(__filename); +const selectAPage = 'Select a Page'; + +const selectMenuOptions = new ActionRowBuilder().addComponents([ + new StringSelectMenuBuilder() + .setCustomId('helpSelectMenu') + .setPlaceholder(selectAPage) + .addOptions([ + { + label: 'Start', + value: 'Start', + description: 'Return to the main menu.', + emoji: '🏠', + }, + { + label: 'Harm Reduction Tools', + value: 'HarmReduction', + description: 'Harm reduction tools and information.', + emoji: '🚑', + }, + { + label: 'TripSit Sessions', + value: 'TripSit', + description: 'TripSit\'s help system.', + emoji: '🛋️', + }, + { + label: 'TripSit Experience', + value: 'TripSitExp', + description: 'TripSit\'s experience system.', + emoji: '🎖️', + }, + { + label: 'Other Systems', + value: 'Systems', + description: 'Various systems you can set up', + emoji: '🔧', + }, + { + label: 'Fun', + value: 'Fun', + description: 'Commands for fun and general use.', + emoji: '🎉', + }, + { + label: 'TripSit Only', + value: 'TripSitOnly', + description: 'Commands only available in TripSit\'s Discord server.', + emoji: '🛑', + }, + { + label: 'Support TripSit', + value: 'Support', + description: 'Support TripSit\'s mission.', + emoji: '💸', + }, + { + label: 'Credits', + value: 'Credits', + description: 'People and projects who have contributed to TripBot.', + emoji: '👏', + }, + { + label: 'Feedback / Development', + value: 'Feedback', + description: 'Provide feedback or get involved in development.', + emoji: '📢', + }, + { + label: 'Invite', + value: 'Invite', + description: 'Invite TripBot to your server.', + emoji: '💌', + }, + ]), +]); + +async function startPage():Promise { + return { + embeds: [ + embedTemplate() + .setTitle('Welcome to TripSit\'s TripBot') + .setURL('https://tripsit.me') + .addFields( + { + name: 'About TripSit', + value: tripsit.description, + }, + { + name: 'About TripBot', + value: tripsit.botInfo, + }, + { + name: 'Disclaimer', + value: tripsit.disclaimer, + }, + ), + ], + components: [ + selectMenuOptions, + ], + }; +} + +async function hrPage():Promise { + return { + embeds: [ + embedTemplate() + .setTitle('Harm Reduction Modules') + .setDescription(stripIndents` + These commands are for harm reduction purposes, and are not intended to replace the advice of a medical professional. + + Harm reduction is a set of practical strategies and ideas aimed at reducing negative consequences associated with drug use. Harm Reduction is also a movement for social justice built on a belief in, and respect for, the rights of people who use drugs. + `) + .addFields( + { name: '\u200B', value: '**Informational**', inline: false }, + { + name: 'Drug', + value: stripIndents`Display drug information sourced from both TripSit and Psychonaut Wiki. + Accepts alias and common names for substances.`, + inline: true, + }, + { + name: 'Combo', + value: 'Display drug combination information sourced from both TripSit and Psychonaut Wiki.', + inline: true, + }, + { + name: 'Crisis', + value: 'Display information about crisis resources.', + inline: true, + }, + { + name: 'Warmline', + value: 'Display information on various warmlines people can call.', + inline: true, + }, + { + name: 'Guides', + value: 'Display a list of guides from the TripSit Wiki.', + inline: true, + }, + { + name: 'Drug Checking', + value: 'Display information about drug checking services.', + inline: true, + }, + { + name: 'Test Kits', + value: 'Display information on how to get drug testing kits, including cooupon codes', + inline: true, + }, + { name: '\u200B', value: '**Picture References**', inline: false }, + { + name: 'ComboChart', + value: 'Display a chart of drug combinations and their safety ratings.', + inline: true, + }, + { + name: 'Breathe', + value: 'Display various breathing techniques.', + inline: true, + }, + { + name: 'Grounding', + value: 'Steps to help the user ground themselves.', + inline: true, + }, + { + name: 'Recovery', + value: 'Display the recovery position.', + inline: true, + }, + { + name: 'Reagents', + value: 'Display information about common substances and their reagent reactions.', + inline: true, + }, + { + name: 'Mushrom Info', + value: 'Display dosage information about common mushrooms.', + inline: true, + }, + { name: '\u200B', value: '**Calculators**', inline: false }, + { + name: 'Calc DXM', + value: 'Calculate a safe dosage of DXM based on weight and product.', + inline: true, + }, + { + name: 'Calc Benzos', + value: 'Convert one benzodiazepine to another, very roughly.', + inline: true, + }, + { + name: 'Calc Ketamine', + value: 'Calculate a safe dosage of Ketamine based on weight.', + inline: true, + }, + { + name: 'Calc Psychedelics', + value: 'Calculate dosage of tryptamines (LSD/Mushrooms) based on last dosage.', + inline: true, + }, + { name: '\u200B', value: '**Tools and Utils**', inline: false }, + { + name: 'iDose', + value: 'Record your dosages and recall them at a later time.', + inline: true, + }, + { + name: 'Remind Me', + value: 'Set a reminder for a specific time.', + inline: true, + }, + { + name: 'Convert', + value: 'Convert one unit to another.', + inline: true, + }, + ), + ], + components: [ + selectMenuOptions, + ], + }; +} + +async function funPage():Promise { + return { + embeds: [ + embedTemplate() + .setTitle('Fun Modules') + .setDescription('These commands are for fun and general use.') + .addFields( + { + name: 'Image', + value: 'Generate an image using DALL-E. Only available to active subscribers!', + inline: true, + }, + { + name: 'Avatar', + value: "Get a user's avatar.", + inline: true, + }, + { + name: 'TripToys', + value: 'Display a list of trip toys.', + inline: true, + }, + { + name: 'KIPP', + value: 'Remind people to Keep It Positive Please.', + inline: true, + }, + { + name: 'Hydrate', + value: 'Remind people to stay hydrated', + inline: true, + }, + { + name: 'Imgur', + value: 'Search Imgur for images.', + inline: true, + }, + { + name: 'IMDB', + value: 'Search IMDB for movies/tv shows.', + inline: true, + }, + { + name: 'Magick8Ball', + value: 'Ask the magic 8 ball a question.', + inline: true, + }, + { + name: 'Urban Define', + value: 'Define a word using Urban Dictionary.', + inline: true, + }, + { + name: 'Topic', + value: 'Get a random topic to discuss.', + inline: true, + }, + { + name: 'Joke', + value: 'Get a random joke.', + inline: true, + }, + { + name: 'Coinflip', + value: 'Flip a coin.', + inline: true, + }, + { + name: 'Lovebomb', + value: 'Send a lovebomb.', + inline: true, + }, + { + name: 'Remindme', + value: 'Set a reminder for a specific time.', + inline: true, + }, + { + name: 'Poll', + value: 'Create a poll.', + inline: true, + }, + { + name: 'Wikipedia', + value: 'Search Wikipedia for articles.', + inline: true, + }, + ), + ], + components: [ + selectMenuOptions, + ], + }; +} + +async function sessionsPage():Promise { + return { + embeds: [embedTemplate() + .setColor(Colors.Purple) + .setTitle('**TripSit Sessions**') + .setDescription(tripsit.tripsitSessionsDesc)], + components: [ + selectMenuOptions, + ], + }; +} + +async function experiencePage():Promise { + return { + embeds: [embedTemplate() + .setColor(Colors.Purple) + .setTitle('**Experience System**') + .setDescription(tripsit.experienceDesc)], + components: [ + selectMenuOptions, + ], + }; +} + +async function systemsPage():Promise { + return { + embeds: [embedTemplate() + .setColor(Colors.Purple) + .setTitle('🚀 **TripBot Systems!** 🚀') + .setDescription('TripBot has a few systems you can set up to help manage your server.') + .addFields( + { + name: 'Applications', + value: stripIndents` + This allows you to setup a system for users to apply for roles. + It allows people to submit an application, and then the staff can review and approve or deny the application. + It is not used on TripSit anymore but is available for use in other servers.`, + inline: true, + }, + { + name: 'Tech Help', + value: stripIndents` + This creates a "talk to moderators" message where people can fill in a form to get help with issues + It doesn't need to be technical issues, it can be moderation or whatever.`, + inline: true, + }, + { + name: 'Rules', + value: stripIndents` + This creates a series of messages in the channel to display your rules. It comes with some default rules that TripSit uses.`, + inline: true, + }, + )], + components: [ + selectMenuOptions, + ], + }; +} + +async function tripsitPage():Promise { + return { + embeds: [ + embedTemplate() + .setTitle('TripSit Specific Modules') + .setDescription('These commands are only available in TripSit\'s Discord server.') + .addFields( + { + name: 'Profile System', + value: stripIndents` + This will display your profile card for all to see! + Your profile card includes information such as: + - Your birthday, set with \`/birthday\`. + - Your timezone, set with \`/timezone\`. + - A rough calculations on how many messages you've sent. + - A rough calculation on how much time you've spent in voice chat. + - How much karma you have, which is given to you when people react to your posts with ${env.EMOJI_VOTE_UP}. + - How many tokens you have, which are gained via the \`/rpg\` system. + - Your current level and progress to next level. + `, + inline: false, + }, + { + name: 'RPG', + value: stripIndents` + TripBot has its own RPG game system where you can generate tokens and buy flavor stuff for your profile. + You can do tasks to gain tokens, and then spend them on things like: + - Backgrounds for your profile card. + - Titles for your profile card. + ... More to come!`, + inline: false, + }, + { + name: 'Quotes', + value: stripIndents` + Right click on a message and click 'add quote' to add a quote to the quote database. + Anyone can add a quote, you can always delete your own quotes if you want.`, + inline: false, + }, + { + name: 'H2Flow', + value: stripIndents` + Every so often TripBot will prompt the chat to either: hydrate, move around, send appreciation to someone. + React to these messages to gain points, that's all. It's just a fun little thing to keep people engaged and active.`, + inline: true, + }, + { + name: 'Reminder', + value: stripIndents` + Sends various reminders into chat, to remind people to keep things on topic.`, + inline: true, + }, + { + name: 'Counting', + value: stripIndents` + Counting channels, exactly what it sounds like. You count up from 1, and if you mess up, you start over.`, + inline: true, + }, + { + name: 'Last', + value: stripIndents` + See the last message someone sent in chat.`, + inline: true, + }, + { + name: 'Sheesh', + value: stripIndents` + Start a smoke sheesh session.`, + inline: true, + }, + ), + ], + components: [ + selectMenuOptions, + ], + }; +} + +async function donatePage():Promise { + return { + embeds: [embedTemplate() + .setColor(Colors.Purple) + .setTitle('🚀 **TripSit\'s Donation Info!** 🚀') + .setURL('https://tripsit.me/donate/') + .setDescription(tripsit.support)], + components: [ + selectMenuOptions, + new ActionRowBuilder().addComponents([ + new ButtonBuilder() + .setLabel('Patreon') + .setEmoji('🎩') + .setStyle(ButtonStyle.Link) + .setURL(tripsit.patreon), + new ButtonBuilder() + .setLabel('Ko-Fi') + .setEmoji('☕') + .setStyle(ButtonStyle.Link) + .setURL(tripsit.kofi), + new ButtonBuilder() + .setLabel('Spreadshop') + .setEmoji('👕') + .setStyle(ButtonStyle.Link) + .setURL(tripsit.spreadshop), + new ButtonBuilder() + .setLabel('Spreadshirt') + .setEmoji('👕') + .setStyle(ButtonStyle.Link) + .setURL(tripsit.spreadshirt), + ]), + ], + }; +} + +async function creditsPage():Promise { + return { + embeds: [embedTemplate() + .setColor(Colors.Orange) + .setDescription(tripsit.credits)], + components: [ + selectMenuOptions, + ], + }; +} + +async function feedbackPage():Promise { + return { + embeds: [embedTemplate() + .setColor(Colors.Green) + .setDescription(tripsit.feedback)], + components: [ + selectMenuOptions, + new ActionRowBuilder().addComponents([ + new ButtonBuilder() + .setCustomId('feedbackReport') + .setLabel('Feedback') + .setEmoji('📢') + .setStyle(ButtonStyle.Primary), + new ButtonBuilder() + .setLabel('Github Repo') + .setEmoji('🐙') + .setStyle(ButtonStyle.Link) + .setURL(tripsit.github), + ]), + ], + }; +} + +async function invitePage():Promise { + return { + embeds: [embedTemplate() + .setColor(Colors.Yellow) + .setDescription(tripsit.inviteInfo)], + components: [ + selectMenuOptions, + new ActionRowBuilder().addComponents([ + new ButtonBuilder() + .setLabel('Invite') + .setEmoji('💌') + .setStyle(ButtonStyle.Link) + .setURL(tripsit.inviteUrl), + ]), + ], + }; +} + +export async function helpMenu( + interaction: StringSelectMenuInteraction, +) { + log.info(F, await commandContext(interaction)); + const category = interaction.values[0]; + switch (category) { + case 'Start': + await interaction.update(await startPage()); + break; + case 'HarmReduction': + await interaction.update(await hrPage()); + break; + case 'Systems': + await interaction.update(await systemsPage()); + break; + case 'Fun': + await interaction.update(await funPage()); + break; + case 'TripSit': + await interaction.update(await sessionsPage()); + break; + case 'TripSitExp': + await interaction.update(await experiencePage()); + break; + case 'TripSitOnly': + await interaction.update(await tripsitPage()); + break; + case 'Support': + await interaction.update(await donatePage()); + break; + case 'Credits': + await interaction.update(await creditsPage()); + break; + case 'Feedback': + await interaction.update(await feedbackPage()); + break; + case 'Invite': + await interaction.update(await invitePage()); + break; + default: + await interaction.update(await startPage()); + break; + } +} + export const dHelp: SlashCommand = { data: new SlashCommandBuilder() .setName('help') @@ -19,76 +618,7 @@ export const dHelp: SlashCommand = { async execute(interaction) { log.info(F, await commandContext(interaction)); await interaction.deferReply({ ephemeral: (interaction.options.getBoolean('ephemeral') === true) }); - - const globalCommands = await interaction.client.application.commands.fetch(); - const guildCommands = await interaction.client.application.commands.fetch({ guildId: env.DISCORD_GUILD_ID }); - - function getDesc(commandName:string):string | undefined { - // log.debug(F, `getDesc: ${commandName}`); - if (!globalCommands || !guildCommands) return undefined; - // log.debug(F, `getDesc: ${desc}`); - return globalCommands.filter(command => command.name === commandName).at(0)?.description - ?? guildCommands.filter(command => command.name === commandName).at(0)?.description; - } - - if (getDesc('drug') === undefined) { - log.error(F, 'getDesc(\'drug\') is undefined'); - return false; - } - - const hrEmbed = embedTemplate(); - hrEmbed.setTitle('Harm Reduction Modules'); - hrEmbed.addFields({ name: 'Drug', value: getDesc('drug') ?? '', inline: true }); - hrEmbed.addFields({ name: 'Combo', value: getDesc('drug') ?? '', inline: true }); - hrEmbed.addFields({ name: 'iDose', value: getDesc('idose') ?? '', inline: true }); - hrEmbed.addFields({ name: 'ComboChart', value: getDesc('drug') ?? '', inline: true }); - hrEmbed.addFields({ name: 'Reagents', value: getDesc('drug') ?? '', inline: true }); - hrEmbed.addFields({ name: 'Calc Psychedelics', value: getDesc('calc_psychedelics') ?? '', inline: true }); - hrEmbed.addFields({ name: 'Calc DXM', value: getDesc('calc_dxm') ?? '', inline: true }); - hrEmbed.addFields({ name: 'Calc Benzos', value: getDesc('calc_benzo') ?? '', inline: true }); - hrEmbed.addFields({ name: 'Calc Ketamine', value: getDesc('calc_ketamine') ?? '', inline: true }); - hrEmbed.addFields({ name: 'Recovery', value: getDesc('recovery') ?? '', inline: true }); - hrEmbed.addFields({ name: 'Breathe', value: getDesc('breathe') ?? '', inline: true }); - hrEmbed.addFields({ name: 'Warmline', value: getDesc('warmline') ?? '', inline: true }); - hrEmbed.addFields({ name: 'KIPP', value: getDesc('kipp') ?? '', inline: true }); - hrEmbed.addFields({ name: 'Hydrate', value: getDesc('hydrate') ?? '', inline: true }); - hrEmbed.addFields({ name: 'Crisis', value: getDesc('crisis') ?? '', inline: true }); - - const funEmbed = embedTemplate(); - funEmbed.setTitle('Other Modules'); - funEmbed.addFields({ name: 'About', value: getDesc('about') ?? '', inline: true }); - funEmbed.addFields({ name: 'Contact', value: getDesc('contact') ?? '', inline: true }); - funEmbed.addFields({ name: 'Feedback', value: getDesc('feedback') ?? '', inline: true }); - funEmbed.addFields({ name: 'Triptoys', value: getDesc('triptoys') ?? '', inline: true }); - funEmbed.addFields({ name: 'Imgur', value: getDesc('imgur') ?? '', inline: true }); - funEmbed.addFields({ name: 'Magick8Ball', value: getDesc('magick8ball') ?? '', inline: true }); - // funEmbed.addFields({ name: 'Urban Define', value: getDesc('urban_define') ?? '', inline: true }); - funEmbed.addFields({ name: 'Topic', value: getDesc('topic') ?? '', inline: true }); - funEmbed.addFields({ name: 'Joke', value: getDesc('joke') ?? '', inline: true }); - // funEmbed.addFields({ name: 'Youtube', value: getDesc('youtube') ?? '', inline: true }); - funEmbed.addFields({ name: 'Coinflip', value: getDesc('coinflip') ?? '', inline: true }); - funEmbed.addFields({ name: 'Lovebomb', value: getDesc('lovebomb') ?? '', inline: true }); - funEmbed.addFields({ name: 'Remindme', value: getDesc('remind_me') ?? '', inline: true }); - funEmbed.addFields({ name: 'Convert', value: getDesc('convert') ?? '', inline: true }); - funEmbed.addFields({ name: 'Poll', value: getDesc('poll') ?? '', inline: true }); - // funEmbed.addFields({name: 'Youtube', value: getDesc('youtube'), inline: true}); - - const tripsitEmbed = embedTemplate(); - tripsitEmbed.setTitle('Tripsit-Only Modules'); - // tripsitEmbed.addFields({name: 'TripSit', value: getDesc('tripsit'), inline: true}); - tripsitEmbed.addFields({ name: 'Clearchat', value: getDesc('clear-chat') ?? '', inline: true }); - tripsitEmbed.addFields({ name: 'Birthday', value: getDesc('birthday') ?? '', inline: true }); - tripsitEmbed.addFields({ name: 'Timezone', value: getDesc('timezone') ?? '', inline: true }); - tripsitEmbed.addFields({ name: 'Profile', value: getDesc('profile') ?? '', inline: true }); - // tripsitEmbed.addFields({ name: 'Moderate', value: getDesc('mod') ?? '', inline: true }); - tripsitEmbed.addFields({ name: 'Report', value: getDesc('report') ?? '', inline: true }); - - const book = [ - hrEmbed, - funEmbed, - tripsitEmbed, - ]; - paginationEmbed(interaction, book); + await interaction.editReply(await startPage()); return true; }, }; diff --git a/src/discord/commands/global/d.setup.ts b/src/discord/commands/global/d.setup.ts index 27d4836ce..eb9d04441 100644 --- a/src/discord/commands/global/d.setup.ts +++ b/src/discord/commands/global/d.setup.ts @@ -28,6 +28,7 @@ import { applicationSetup } from '../../utils/application'; import { paginationEmbed } from '../../utils/pagination'; import { embedTemplate } from '../../utils/embedTemplate'; import { profile } from '../../../global/commands/g.learn'; +import tripsitInfo from '../../../global/commands/g.about'; const F = f(__filename); @@ -43,85 +44,15 @@ async function help( ) { const tripsitEmbed = embedTemplate() .setTitle('How To Setup TripSit Sessions') - .setDescription(stripIndents` - **What is a TripSit Session?** - This is TripSit's help system, basically a support ticket system for people on substances! - - ** What does this to? ** - This will create a message in the Tripsit room with a button to create a new thread. - When a user clicks this button they will be asked two vital questions for tripsitting, and then they submit the form. - The Needshelp role will be assigned to the user and the bot will try to remove every other role the user has. - This makes it so that people who need help are restricted to the Tripsit room and can't see any other channels. - The bot will then create a new thread in the Tripsit room and ping the user, along with the Tripsitters and optionally Helpers. - The user can then talk to the Tripsitters and Helpers in the thread. - When the user is done with their session, they can click and the bot will reassign their roles. - - Full details on how to use this system can be found [on our learning portal](https://learn.tripsit.me/mod/lesson/view.php?id=24)! - - ** How do I set it up? ** - 1. Create a room where you want a message posted and threads created (Tripsit) - 2. Create a room where people will talk about Tripsit encounters (Meta-tripsit) - 3. Create a role that will be assigned to users who need help (Needshelp) - 3a. Set up the permissions for this role so that it can only see the Tripsit room - 4. Create a role that will respond to new sessions (Tripsitter) - 5. (Optional) Create a secondary role that will respond to new sessions (Helper) - 6. Run the /setup tripsit command with each of the above channels and roles - - ** Troubleshooting ** - If you have any issues with this system, please contact Moonbear on the TripSit guild! - They're happy to give direct support to any problems you may have! - `); + .setDescription(tripsitInfo.tripsitSessionsDesc); const applicationsEmbed = embedTemplate() .setTitle('How To Setup Applications') - .setDescription(stripIndents` - **What is an Application system?** - This is an application system to allow people to apply for roles in your guild! - - ** What does this to? ** - This will create a message in the room you run this command with a button. - When a user clicks this button they will be asked two questions: - 1. Why do you want to help out? - 2. What skills can you bring to the team? - The user submits this forum and a new thread is created in a separate channel for the team to discuss the application. - The thread is created in a separate room so that people cannot accidentally @ the user and add them to the thread. - There is a 24 hour cool down before an application can be accepted or rejected, to give everyone a chance to discuss the application. - There are a list of pre-defined responses that can be used to reject the application, if desired, but a custom response is usually better. - - ** How do I set it up? ** - 1. Create a room where you want a message posted (Apply-Here) - 2. Create a room where people will talk about applications (Applications) - 3. Create a role that people can apply for (Tripsitter) - 4. Create a role that will review applications (Moderator) - 5. Run the /setup applications command with each of the above channels and roles - - ** Troubleshooting ** - If you have any issues with this system, please contact Moonbear on the TripSit guild! - They're happy to give direct support to any problems you may have! - `); + .setDescription(tripsitInfo.applicationsDesc); const techHelpEmbed = embedTemplate() .setTitle('How To Setup TechHelp') - .setDescription(stripIndents` - **What is a TechHelp system?** - This is a system to allow people to ask for help with technical issues in your guild! - This can be mod requests or whatever, it doesn't need to be technology related! - - ** What does this to? ** - This is a lot like the Tripsit Sessions system, with some changes: - 1. The user is not restricted to a single room/thread. - 2. There is no meta-channel for discussion, we assume you already have a #moderator room for that. - 3. There is no "im good button" because the bot does not remove roles, but there is a "issue resolved" button. - - ** How do I set it up? ** - 1. Create a room where you want a message posted (TechHelp) - 2. Create a role that will respond to new sessions (Moderator) - 3. Run the /setup techhelp command with each of the above channels and roles - - ** Troubleshooting ** - If you have any issues with this system, please contact Moonbear on the TripSit guild! - They're happy to give direct support to any problems you may have! - `); + .setDescription(tripsitInfo.techhelpDesc); const rulesEmbed = embedTemplate() .setTitle('How To Setup Rules') @@ -132,27 +63,7 @@ async function help( const ticketboothEmbed = embedTemplate() .setTitle('How To Setup Ticketbooth') - .setDescription(stripIndents` - **What is a Ticketbooth system?** - This sets up a 'front desk' type channel where users must read and click a button in order to see the rest of the guild. - This is useful for guilds that want to restrict access to the rest of the guild until a user has read the rules. - - ** What does this to? ** - This will create a message in the room you run this command with a button. - When a user clicks this button they will be given a role. - - ** How do I set it up? ** - 1. Create a room where you want a message posted (Ticketbooth) - 2. Create a role that will be assigned to users who click the button (Verified) - 3. Setup permissions: - 3a. Make sure that Everyone can see the Ticketbooth room, but not the rest of the guild. - 3b. Make sure that Verified users can see the rest of the guild, but not the Ticketbooth room. - 3. Run the /setup ticketbooth command with each of the above channels and roles - - ** Troubleshooting ** - If you have any issues with this system, please contact Moonbear on the TripSit guild! - They're happy to give direct support to any problems you may have! - `); + .setDescription(tripsitInfo.ticketboothDesc); const book = [ tripsitEmbed, @@ -502,8 +413,6 @@ If you do not agree to this policy, do not use this site. flags: ['SuppressEmbeds'], }); - const talkToModsChannel = await interaction.guild?.channels.fetch(env.CHANNEL_HELPDESK); - await (interaction.channel as TextChannel).send({ content: stripIndents` > 🔞 **1. Do not connect to TripSit or use our services if you are under eighteen.** @@ -515,7 +424,7 @@ If you do not agree to this policy, do not use this site. > d. Do not display an offensive profile picture, including pornography of any kind. > e. Do not use an offensive nickname or one that could cause anxiety in others, e.g., law enforcement or dictators. > f. Do not post content that victimizes, harasses, degrades, or intimidates an individual or group based on race, ethnicity, religion, sexual orientation, gender identification, drug of choice, level of addiction, mental health status, or other reasons. - > g. Do not argue rules in public channels, take it to ${talkToModsChannel}. + > g. Do not argue rules in public channels. > 💊 **3. Do not discuss, request, or post identifying information of websites, online vendors, or real-life people who sell or coordinate the purchase, distribution, or production of substances (legal, clear-net, or otherwise) or cryptocurrencies, i.e., no sourcing.** > a. Do not discuss the specifics or go in-depth into the mechanics of online vending. diff --git a/src/discord/events/buttonClick.ts b/src/discord/events/buttonClick.ts index 9589ac743..4a4e2ea97 100644 --- a/src/discord/events/buttonClick.ts +++ b/src/discord/events/buttonClick.ts @@ -26,6 +26,7 @@ import { helperButton } from '../commands/global/d.setup'; import { appealAccept, appealReject } from '../utils/appeal'; import { mushroomPageOne, mushroomPageTwo } from '../commands/global/d.mushroom_info'; import { acknowledgeButton, modModal, refusalButton } from '../commands/guild/d.moderate'; +import { feedbackReportModal } from '../commands/global/d.feedback'; // import { helpButton } from '../commands/global/d.help'; const F = f(__filename); @@ -37,10 +38,10 @@ export async function buttonClick(interaction:ButtonInteraction, discordClient:C // log.debug(F, 'Interaction deferred!'); const buttonID = interaction.customId; - // if (buttonID.startsWith('helpButton')) { - // await helpButton(interaction); - // return; - // } + if (buttonID.startsWith('feedbackReport')) { + await feedbackReportModal(interaction); + return; + } if (buttonID.startsWith('mushroom')) { // log.debug(F, 'Werewolf button clicked'); diff --git a/src/discord/events/selectMenu.ts b/src/discord/events/selectMenu.ts index 778215f47..511d182ed 100644 --- a/src/discord/events/selectMenu.ts +++ b/src/discord/events/selectMenu.ts @@ -5,6 +5,7 @@ import { import { rpgHome, rpgMarketChange } from '../commands/guild/d.rpg'; import { applicationStart, applicationReject } from '../utils/application'; import commandContext from '../utils/context'; +import { helpMenu } from '../commands/global/d.help'; // import log from '../../global/utils/log'; // import {parse} from 'path'; const F = f(__filename); @@ -17,6 +18,11 @@ export async function selectMenu(interaction:StringSelectMenuInteraction): Promi const menuID = interaction.customId; + if (menuID.startsWith('helpSelectMenu')) { + await helpMenu(interaction); + return; + } + if (menuID.startsWith('rpg')) { if (!menuID.includes(interaction.user.id)) { log.debug(F, 'Button clicked by someone other than the user who clicked it'); diff --git a/src/discord/tests/about.test.ts b/src/discord/tests/about.test.ts deleted file mode 100644 index 11e4376cf..000000000 --- a/src/discord/tests/about.test.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* eslint-disable max-len */ - -import { - Colors, -} from 'discord.js'; -import { stripIndents } from 'common-tags'; -import { dAbout } from '../commands/global/d.about'; -import { executeCommandAndSpyEditReply, embedContaining, getParsedCommand } from '../../jest/utils/testutils'; - -const slashCommand = dAbout; - -const authorInfo = { - iconURL: 'https://i.gyazo.com/b48b08a853fefaafb6393837eec1a501.png', - name: 'TripSit.Me', - url: 'http://www.tripsit.me', -}; -const footerInfo = { - iconURL: 'https://i.gyazo.com/19276c297cca0761dc9689ac7c320b8e.png', - text: 'Dose responsibly!', -}; - -describe(slashCommand.data.name, () => { - it(slashCommand.data.description, async () => { - expect(await executeCommandAndSpyEditReply( - slashCommand, - getParsedCommand( - `/${slashCommand.data.name}`, - slashCommand.data, - 'tripsit', - ), - )).toHaveBeenCalledWith({ - embeds: embedContaining({ - author: authorInfo, - footer: footerInfo, - color: Colors.DarkBlue, - title: 'About TripBot', - url: 'https://tripsit.me/about/', - description: stripIndents`This app is created by TripSit, an organization which helps to provide factual information about drugs and how to reduce the harms involved in using them. - The official support server is [TripSit discord](https://discord.gg/TripSit). If you have issues/questions, join and talk with Moonbear!`, - fields: [ - { - name: 'Invite', - value: stripIndents`[Click here to invite TripBot to your own server](https://discord.com/api/oauth2/authorize?client_id=957780726806380545&permissions=18432&scope=bot%20applications.commands). - Note: For advanced features you will need to give the bot more permissions at your discretion.`, - }, - { - name: 'Disclaimer', - value: stripIndents`Although we have a team dedicated to keeping the information on this app up to date, it is not always possible to provide entirely accurate information on the safety level of drugs. The information here should be used as guidelines only, and it is important to do your own research from multiple sources before ingesting a substance. - We also strongly advise using a testing kit and scales to ensure you are taking the correct dosage. These can both be bought online for reasonable prices.`, - }, - { - name: 'Support TripSit', - value: stripIndents`TripSit is a completely free service run by volunteers. - If you wish to help out, feel free to join the [discord](https://discord.gg/TripSit), follow and share our content on social media, or make a donation on the [Patreon](https://www.patreon.com/TripSit)!`, - }, - { - name: 'Feedback', - value: stripIndents`We would love to hear your feedback on this bot! - Join the [TripSit discord](https://discord.gg/TripSit) and talk with Moonbear! - Or use the /bug command and to send a message!`, - }, - { - name: 'Credits', - value: stripIndents`The bot is built using the [Discord.js library](https://discordjs.guide/) - A majority of this code is original, and is available on [GitHub](https://github.com/TripSit/TripBot) - The data is sourced from the [TripSit and Psychonaut Wiki API combined](https://github.com/NoahSaso/merge-psychonautwiki-tripsit-data) - The DXM calculator comes from [Tripsit](https://github.com/TripSit/DXM-Calculator) - The Benzo calculator comes from [Tripsit](https://github.com/TripSit/Benzo-Calculator) - The Ketamine calculator and pill_id code was inspired by [PsyBot](https://github.com/v0idp/PsyBot) - The LSD calculator info was inspired from [this codepen](https://codepen.io/cyberoxide/pen/BaNarGd) - The actual [research for the LSD calculator](https://www.reddit.com/r/LSD/comments/4dzh9s/lsd_tolerance_calculator_improved/)`, - }, - ], - }), - }); - }); -}); diff --git a/src/discord/tests/contact.test.ts b/src/discord/tests/contact.test.ts deleted file mode 100644 index ed8304e20..000000000 --- a/src/discord/tests/contact.test.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { - Colors, -} from 'discord.js'; -import { stripIndents } from 'common-tags'; -import { dContact } from '../commands/global/d.contact'; -import { executeCommandAndSpyEditReply, embedContaining, getParsedCommand } from '../../jest/utils/testutils'; - -const slashCommand = dContact; - -const authorInfo = { - iconURL: 'https://i.gyazo.com/b48b08a853fefaafb6393837eec1a501.png', - name: 'TripSit.Me', - url: 'http://www.tripsit.me', -}; -// const footerInfo = { -// iconURL: 'https://i.gyazo.com/19276c297cca0761dc9689ac7c320b8e.png', -// text: 'Dose responsibly!', -// }; - -describe(slashCommand.data.name, () => { - it(slashCommand.data.description, async () => { - expect(await executeCommandAndSpyEditReply( - slashCommand, - getParsedCommand( - `/${slashCommand.data.name}`, - slashCommand.data, - 'tripsit', - ), - )).toHaveBeenCalledWith({ - embeds: embedContaining({ - author: authorInfo, - footer: { - iconURL: undefined, - text: 'Thanks for asking!', - }, - color: Colors.Purple, - title: 'Contact TripSit', - url: 'https://tripsit.me/contact-us/', - description: stripIndents`The best way to get in contact with TeamTripsit the Discord via the link below! - If you have a problem with the bot, join the discord and talk to Moonbear#1024! - Or you can use /bug to report a bug, or you can DM the bot to submit feedback!`, - fields: [ - { - name: 'Discord', - value: stripIndents`[Join our discord](http://discord.gg/TripSit)`, - inline: true, - }, - { - name: 'Bot Issues Email', - value: stripIndents`discord@tripsit.me`, - inline: true, - }, - { - name: 'Drug Info Issues Email', - value: stripIndents`content@tripsit.me`, - inline: true, - }, - ], - }), - }); - }); -}); diff --git a/src/discord/tests/donate.test.ts b/src/discord/tests/donate.test.ts deleted file mode 100644 index 6791fedef..000000000 --- a/src/discord/tests/donate.test.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { - Colors, -} from 'discord.js'; -import { stripIndents } from 'common-tags'; -import { dDonate } from '../commands/global/d.donate'; -import { executeCommandAndSpyEditReply, embedContaining, getParsedCommand } from '../../jest/utils/testutils'; - -const slashCommand = dDonate; - -const authorInfo = { - iconURL: 'https://i.gyazo.com/b48b08a853fefaafb6393837eec1a501.png', - name: 'TripSit.Me', - url: 'http://www.tripsit.me', -}; -const footerInfo = { - iconURL: 'https://i.gyazo.com/19276c297cca0761dc9689ac7c320b8e.png', - text: 'Dose responsibly!', -}; - -describe(slashCommand.data.name, () => { - it(slashCommand.data.description, async () => { - expect(await executeCommandAndSpyEditReply( - slashCommand, - getParsedCommand( - `/${slashCommand.data.name}`, - slashCommand.data, - 'tripsit', - ), - )).toHaveBeenCalledWith({ - embeds: embedContaining({ - author: authorInfo, - footer: footerInfo, - color: Colors.Purple, - title: 'Donate to keep TripSit running and fund our future projects!', - url: 'https://tripsit.me/donate/', - description: stripIndents`The best way to support us is to join the discord and help out people! - We run on volunteers and need your help to keep the org going - If you can donate, our preferred method is Patreon, and we're happy for all donation sizes! - You can get supporter benefits for as little as $1 a month!`, - fields: [ - { - name: 'Patreon (Preferred)', - value: stripIndents`[Website](https://patreon.com/tripsit)`, - inline: true, - }, - { - name: 'Discord Boosts', - value: stripIndents`[Website](http://discord.gg/TripSit)`, - inline: true, - }, - { - name: '\u200B', value: '\u200B', inline: true, - }, - { - name: 'Spreadshop', - value: stripIndents`[Website](https://tripsit.myspreadshop.com/)`, - inline: true, - }, - { - name: 'Spreadshirt', - value: stripIndents`[Website](https://www.spreadshirt.com/shop/tripsit/)`, - inline: true, - }, - { - name: '\u200B', - value: '\u200B', - inline: true, - }, - ], - }), - }); - }); -}); diff --git a/src/global/commands/g.about.ts b/src/global/commands/g.about.ts index 643b824f1..c813a6357 100644 --- a/src/global/commands/g.about.ts +++ b/src/global/commands/g.about.ts @@ -1,67 +1,250 @@ /* eslint-disable max-len */ import { stripIndents } from 'common-tags'; -const F = f(__filename); - -export default about; - -/** - * Information about the bot! - * @return {aboutInfo} an object with information about the bot - */ -export async function about():Promise { - const aboutInfo = { - name: 'TripSit', - url: 'https://tripsit.me/', - description: stripIndents` - This app is created by TripSit, an organization which helps to provide factual information\ - about drugs and how to reduce the harms involved in using them. - The official support server is [TripSit discord](https://discord.gg/TripSit). If you have issues/questions, join and talk with Moonbear! - `, - invite: stripIndents` - [Click here to invite TripBot to your own server](https://discord.com/api/oauth2/authorize?client_id=957780726806380545&permissions=18432&scope=bot%20applications.commands). - Note: For advanced features you will need to give the bot more permissions at your discretion. - `, - disclaimer: stripIndents` - Although we have a team dedicated to keeping the information on this app up to date,\ - it is not always possible to provide entirely accurate information on the safety\ - level of drugs. The information here should be used as guidelines only, and it is\ - important to do your own research from multiple sources before ingesting a substance. - We also strongly advise using a testing kit and scales to ensure you are taking the\ - correct dosage. These can both be bought online for reasonable prices. - `, - support: stripIndents` - TripSit is a completely free service run by volunteers. - If you wish to help out, feel free to join the [discord](https://discord.gg/TripSit),\ - follow and share our content on social media, or make a donation on the [Patreon](https://www.patreon.com/TripSit)! - `, - feedback: stripIndents` - We would love to hear your feedback on this bot! - Join the [TripSit discord](https://discord.gg/TripSit) and talk with Moonbear! - Or use the /bug command and to send a message! - `, - credits: stripIndents` - The bot is built using the [Discord.js library](https://discordjs.guide/) - A majority of this code is original, and is available on [GitHub](https://github.com/TripSit/TripBot) - The data is sourced from the [TripSit and Psychonaut Wiki API combined](https://github.com/NoahSaso/merge-psychonautwiki-tripsit-data) - The DXM calculator comes from [Tripsit](https://github.com/TripSit/DXM-Calculator) - The Benzo calculator comes from [Tripsit](https://github.com/TripSit/Benzo-Calculator) - The Ketamine calculator and pill_id code was inspired by [PsyBot](https://github.com/v0idp/PsyBot) - The LSD calculator info was inspired from [this codepen](https://codepen.io/cyberoxide/pen/BaNarGd) - The actual [research for the LSD calculator](https://www.reddit.com/r/LSD/comments/4dzh9s/lsd_tolerance_calculator_improved/) - `, - }; - log.info(F, `response: ${JSON.stringify(aboutInfo, null, 2)}`); - return aboutInfo; -} +export default class About { + public static readonly name: string = 'TripSit'; + + public static readonly url: string = 'https://tripsit.me/'; + + public static readonly inviteUrl: string = 'https://discord.com/api/oauth2/authorize?client_id=957780726806380545&permissions=18432&scope=bot%20applications.commands'; + + public static readonly discord: string = 'https://discord.gg/TripSit'; + + public static readonly github: string = 'https://github.com/tripsit/tripbot'; + + public static readonly botOwner: string = 'Moonbear'; + + public static readonly learnUrl: string = 'https://learn.tripsit.me'; + + public static readonly webchat: string = 'http://chat.tripsit.me'; + + public static readonly botEmail: string = 'discord@tripsit.me'; + + public static readonly contentEmail: string = 'content@tripsit.me'; + + public static readonly patreon: string = 'https://www.patreon.com/TripSit'; + + public static readonly kofi: string = 'https://ko-fi.com/tripsit'; + + public static readonly spreadshop: string = 'https://tripsit.myspreadshop.com/'; + + public static readonly spreadshirt: string = 'https://www.spreadshirt.com/shop/tripsit/'; + + public static readonly tripsitSessionsDoc: string = 'https://docs.google.com/document/d/1Jy0VWTY2pj1EUS0uuoJQfK9LX0UjC-pyBYhAjBT67Ic/edit#heading=h.5n7ta7l8o6dk'; + + public static readonly tripsitSessionsCourse: string = 'https://learn.tripsit.me/mod/lesson/view.php?id=24'; + + public static readonly tripsitSessionsDesc:string = stripIndents` + **What is a TripSit Session?** + This is TripSit's help system, basically a support ticket system for people on substances! + + Full details on how to use this system can be found in our [guide document](${this.tripsitSessionsDoc}) and on our [learning portal](${this.tripsitSessionsCourse})! + + ** What does this to? ** + This will create a message in the Tripsit room with a button to create a new thread. + When a user clicks this button they will be asked two vital questions for tripsitting, and then they submit the form. + The Needshelp role will be assigned to the user and the bot will try to remove every other role the user has. + This makes it so that people who need help are restricted to the Tripsit room and can't see any other channels. + The bot will then create a new thread in the Tripsit room and ping the user, along with the Tripsitters and optionally Helpers. + The user can then talk to the Tripsitters and Helpers in the thread. + When the user is done with their session, they can click and the bot will reassign their roles. + + ** How do I set it up? ** + 1. Create a room where you want a message posted and threads created (Tripsit) + 2. Create a room where people will talk about Tripsit encounters (Meta-tripsit) + 3. Create a role that will be assigned to users who need help (Needshelp) + 3a. Set up the permissions for this role so that it can only see the Tripsit room + 4. Create a role that will respond to new sessions (Tripsitter) + 5. (Optional) Create a secondary role that will respond to new sessions (Helper) + 6. Run the /setup tripsit command with each of the above channels and roles + + ** Troubleshooting ** + If you have any issues with this system, please contact Moonbear on the TripSit guild! + They're happy to give direct support to any problems you may have!`; + + public static readonly description: string = stripIndents` + TripSit is an organization which helps to provide factual information about drugs and how to reduce the harms involved in using them.\ + If you have issues/questions, the best way to get in contact with TeamTripsit is via the official [TripSit discord](${this.discord}),\ + or you can use \`/feedback\` to send a message to Moonbear, TripSit's director.`; + + public static readonly botInfo: string = stripIndents` + TripBot is the main bot on the TripSit Discord guild and handles a little bit of everything, from harm reduction to fun commands.\ + It currently has ${discordClient.commands.size} commands and you can get info on each of them by using the drop down menu below.`; + + public static readonly inviteInfo: string = stripIndents` + Want to add TripBot to your server? It's as easy as clicking the button below! + + More advanced features, like using Tripsitting threads, require the bot to have more permissions.\ + Generally the bot will let you know if it's missing permissions.`; + + public static readonly disclaimer: string = stripIndents` + The information here should be used as guidelines only, and it is important to do your own research from multiple sources before ingesting a substance.\ + TripBot and TripSit are not medical professionals. If you are experiencing a medical emergency, please call 911 or your local emergency number.`; + + public static readonly support: string = stripIndents` + We'll never charge for our services or hide information behind paywalls or annoying ads. Our mission is to help anyone who needs it, no strings attached.\ + But we can't pay for servers with good intentions alone, so your support means the world to us. + + There are a few awesome ways to contribute: + 1) First of all, TripSit is a completely free service run by volunteers, and we are always looking for more help.\ + If you wish to help out, feel free to join the [discord](${this.discord}), and become a valuable member of the community.\ + [Take the course](${this.learnUrl}) and \`/learn link\` your discord account to get started as a Helper. + + If you want to support us financially, there are a few ways to do so: + 2) [Patreon Subscription](${this.patreon}) + For as little as $1 a month, you can become a patron and keep supporting the good cause. + After a long enough subscription, you'll be sent some sweet TripSit merch! + Active patreon subscribers also get a special role in the discord, exclusive to them. + 3) [Ko-Fi Donation](${this.kofi}) + If Subscriptions aren't your style, you can give a one-time boost to our cause through Ko-Fi. + 4) No spare change? Boosting our server will also give you donor perks while your boost is active! -type AboutInfo = { - name: string; - url: string; - invite: string; - description: string; - disclaimer: string; - support: string; - feedback: string; - credits: string; -}; + What's in it for you? Well, we've got some fantastic benefits for our supporters: + + - **Announcement**: We'll tell the guild you've made a difference in #vip-lounge. + - **Gold Lounge Access**: Gain entry to our exclusive donor space, #gold-lounge. + - **Special Donor Colors**: Deck out your Discord persona with unique colors. + - **Supporter Role (Patreon)**: Be shown at the top of the member list with a unique icon. + - More surprises are in the works! Your suggestions are welcome. + + Your donations directly fuel our server costs, ensuring TripSit keeps doing what we do best. + + With enough support, we can even expand and provide new services – who's up for a Minecraft server? 😎 + + Thank you for being a part of our journey, and for helping make the world a safer place!`; + + public static readonly feedback:string = stripIndents` + TripBot is an [open source](${this.github}) project and is a labor of love done by a few (2) volunteers. + We're doing our best, but things can always be better, and we're always looking for new ideas and feedback. + + If you have an idea, a bug report, or just want to say thanks; use the button below to send a message to Moonbear, TripSit's director. + + Your feedback is important to us, we're not in this for the money, we're in this to help people, and we want the bot to be as good as it can be. + + If you have a feature request, please make sure to include as much detail as possible, including how you think it should work, and what it should do. + + If you have a bug report, please include as much detail as possible, including what you were doing when the bug happened, and what you expected to happen. + + If you just want to say thanks, we appreciate it! We love to hear that we're doing a good job, and it helps keep us motivated to keep working on the bot. + + If you're a developer, and you want to help out, the bot is open source, and we're always looking for new contributors. We're happy to help you get started! + + Moonbear is also available on the [TripSit discord](${this.discord}), and is happy to chat about anything bot related, or anything else you want to talk about.`; + + public static readonly credits:string = stripIndents` + The bot is built using the [Discord.js library](https://discordjs.guide/) + A majority of this code is original, and is available on [GitHub](${this.github}) + The data is sourced from the [TripSit and Psychonaut Wiki API combined](https://github.com/NoahSaso/merge-psychonautwiki-tripsit-data) + The DXM calculator comes from [Tripsit](https://github.com/TripSit/DXM-Calculator) + The Benzo calculator comes from [Tripsit](https://github.com/TripSit/Benzo-Calculator) + The Ketamine calculator and pill_id code was inspired by [PsyBot](https://github.com/v0idp/PsyBot) + The LSD calculator info was inspired from [this codepen](https://codepen.io/cyberoxide/pen/BaNarGd) + The actual [research for the LSD calculator](https://www.reddit.com/r/LSD/comments/4dzh9s/lsd_tolerance_calculator_improved/) + The bot itself is a spiritual successor to the original TripBot, which was written for IRC and is now defunct. + `; + + public static readonly privacy:string = stripIndents` + We take privacy very seriously. We only store the data we need to provide our services, and we never sell or share your data with third parties. + If you want to know what data we have on you, or if you want to delete your data, you can use the /privacy command.`; + + public static readonly applicationsDesc = stripIndents` + **What is an Application system?** + This is an application system to allow people to apply for roles in your guild! + + ** What does this to? ** + This will create a message in the room you run this command with a button. + When a user clicks this button they will be asked two questions: + 1. Why do you want to help out? + 2. What skills can you bring to the team? + The user submits this forum and a new thread is created in a separate channel for the team to discuss the application. + The thread is created in a separate room so that people cannot accidentally @ the user and add them to the thread. + There is a 24 hour cool down before an application can be accepted or rejected, to give everyone a chance to discuss the application. + There are a list of pre-defined responses that can be used to reject the application, if desired, but a custom response is usually better. + + ** How do I set it up? ** + 1. Create a room where you want a message posted (Apply-Here) + 2. Create a room where people will talk about applications (Applications) + 3. Create a role that people can apply for (Tripsitter) + 4. Create a role that will review applications (Moderator) + 5. Run the /setup applications command with each of the above channels and roles + + ** Troubleshooting ** + If you have any issues with this system, please contact Moonbear on the TripSit guild! + They're happy to give direct support to any problems you may have!`; + + public static readonly techhelpDesc = stripIndents` + **What is a TechHelp system?** + This is a system to allow people to ask for help with technical issues in your guild! + This can be mod requests or whatever, it doesn't need to be technology related! + + ** What does this to? ** + This is a lot like the Tripsit Sessions system, with some changes: + 1. The user is not restricted to a single room/thread. + 2. There is no meta-channel for discussion, we assume you already have a #moderator room for that. + 3. There is no "im good button" because the bot does not remove roles, but there is a "issue resolved" button. + + ** How do I set it up? ** + 1. Create a room where you want a message posted (TechHelp) + 2. Create a role that will respond to new sessions (Moderator) + 3. Run the /setup techhelp command with each of the above channels and roles + + ** Troubleshooting ** + If you have any issues with this system, please contact Moonbear on the TripSit guild! + They're happy to give direct support to any problems you may have!`; + + public static readonly ticketboothDesc = stripIndents` + **What is a Ticketbooth system?** + This sets up a 'front desk' type channel where users must read and click a button in order to see the rest of the guild. + This is useful for guilds that want to restrict access to the rest of the guild until a user has read the rules. + + ** What does this to? ** + This will create a message in the room you run this command with a button. + When a user clicks this button they will be given a role. + + ** How do I set it up? ** + 1. Create a room where you want a message posted (Ticketbooth) + 2. Create a role that will be assigned to users who click the button (Verified) + 3. Setup permissions: + 3a. Make sure that Everyone can see the Ticketbooth room, but not the rest of the guild. + 3b. Make sure that Verified users can see the rest of the guild, but not the Ticketbooth room. + 3. Run the /setup ticketbooth command with each of the above channels and roles + + ** Troubleshooting ** + If you have any issues with this system, please contact Moonbear on the TripSit guild! + They're happy to give direct support to any problems you may have!`; + + public static readonly levelingCalculator = 'https://hipperooni.github.io/TripSit-Level-Calculator/'; + + public static readonly experienceDesc = stripIndents` + You gain 15-25 experience when you send a message in chat, once per minute, or in other words: \ + If you send 10 messages in 30 seconds, you will only get 15-25 experience. + + Voice experience is calculated the same way, except you must satisfy the following conditions: + 1. Are not a bot + 2. Are in a voice channel + 4. Have not been awarded voice exp in the last 5 minutes + 5. Are not AFK + 6. Are not deafened + 7. Are not muted + 9. Are not in a stage channel + 10. Do not have the NeedsHelp role + 10. With another human in the channel that also meets these conditions + + This prevents people from idling and generating experience, we want to reward people for being active and participating in the community. + + You can use the \`/levels\` command to see your experience breakdown, which is categorized by where you chat: + * Total - The sum of all experience gained. In most contexts this is your "level". + * General - Experience gained from sending messages in most channels. If it's not one of the below categories, it's general. + * TripSitter - Harm Reduction category rooms, helping out when people need it. + * Developer - Development category rooms, talking about development or ideas. + * Team - Team category rooms, talking about team stuff. + + Each of those categories can track text and also voice experience. + + Levels are not used for anything vital, but as you level up you may gain access to new commands or features. + * Every 10 levels, you gain a new level role with it's own icon + * Level 10 grants camera and stream permissions in VC + * Level 20 grants access to a more private lounge channel + + Curious how long it will take to reach X level? Try out the [leveling calculator](${this.levelingCalculator})`; +} diff --git a/src/global/commands/g.botstats.ts b/src/global/commands/g.botstats.ts index c94efbfd8..4d1b79f23 100644 --- a/src/global/commands/g.botstats.ts +++ b/src/global/commands/g.botstats.ts @@ -44,8 +44,32 @@ export async function botStats():Promise { response.tsPwDbSize = Object.keys(drugDataCombined).length; // Get discord stats + + await discordClient.guilds.fetch(); response.guildCount = discordClient.guilds.cache.size; - response.userCount = discordClient.users.cache.size; + response.userCount = 0; + + Promise.all( + discordClient.guilds.cache.map(async (guild) => { + try { + await guild.members.fetch(); + response.userCount += guild.memberCount; + } catch (e) { + // log.error(F, `Error fetching members for guild: ${guild.name}`); + } + }) + ); + + Promise.all( + discordClient.guilds.cache.map(async (guild) => { + try { + await guild.channels.fetch(); + } catch (e) { + // log.error(F, `Error fetching members for guild: ${guild.name}`); + } + }) + ); + response.channelCount = discordClient.channels.cache.size; response.commandCount = discordClient.commands.size; response.uptime = global.bootTime diff --git a/src/global/commands/g.contact.ts b/src/global/commands/g.contact.ts deleted file mode 100644 index 95179b62d..000000000 --- a/src/global/commands/g.contact.ts +++ /dev/null @@ -1,31 +0,0 @@ -const F = f(__filename); - -export default contact; - -/** - * Information about contacting the team! - * @return {any} an object with information about the bot - */ -export async function contact():Promise { - const response = { - name: 'TripSit', - url: 'https://tripsit.me/contact-us/', - discord: 'http://discord.gg/TripSit', - botOwner: 'Moonbear#1024', - webchat: 'http://chat.tripsit.me', - botEmail: 'discord@tripsit.me', - contentEmail: 'content@tripsit.me', - }; - log.info(F, `response: ${JSON.stringify(response, null, 2)}`); - return response; -} - -type Contact = { - name: string; - url: string; - discord: string; - botOwner: string; - webchat: string; - botEmail: string; - contentEmail: string; -}; diff --git a/src/global/commands/g.donate.ts b/src/global/commands/g.donate.ts deleted file mode 100644 index ab18b92ce..000000000 --- a/src/global/commands/g.donate.ts +++ /dev/null @@ -1,49 +0,0 @@ -const F = f(__filename); - -export default donate; - -/** - * Information about contacting the team! - * @return {any} an object with information about the bot - */ -export async function donate():Promise { - const response = [ - { - name: 'Patreon Subscription', - value: 'https://patreon.com/tripsit', - }, - { - name: 'KoFi Tips', - value: 'https://ko-fi.com/tripsit', - }, - { - name: 'Discord Boosts', - value: 'http://discord.gg/TripSit', - }, - { - name: 'Spreadshop', - value: 'https://tripsit.myspreadshop.com/', - }, - { - name: 'Spreadshirt', - value: 'https://www.spreadshirt.com/shop/tripsit/', - }, - { - name: '\u200B', - value: '\u200B', - }, - ]; - log.info(F, `response: ${JSON.stringify(response, null, 2)}`); - return response; -} - -type DonateResource = { - name: string; - value: string; -}; - -const template = // eslint-disable-line -{ - name: '', - value: '', -}; diff --git a/src/global/utils/env.config.ts b/src/global/utils/env.config.ts index ba904efb0..158346ac0 100644 --- a/src/global/utils/env.config.ts +++ b/src/global/utils/env.config.ts @@ -23,6 +23,8 @@ export const env = { EMOJI_THUMB_UP: isProd ? '979721167332052992' : '👍', EMOJI_THUMB_DOWN: isProd ? '979721915390369822' : '👎', + EMOJI_VOTE_UP: isProd ? '958721361587630210' : '👍', + EMOJI_VOTE_DOWN: isProd ? '960161563849932892' : '👎', EMOJI_EROWID: isProd ? '1200132633519194153' : '1200136990788685956', OPENAI_API_ORG: process.env.OPENAI_API_ORG ?? '',