quiz

Instead of using reaction roles, I wanted to have a cute little quiz as a verification process. I wanted the questions to be answered individually, initially. In this version, the initial quiz is resent after the roles are assigned. At the end of the quiz, it's supposed to assign a role that blocks the user from triggering the quiz again. But instead it assigns it when the quiz is triggered. Please help!

Privateunrated

Content

121 lines
{=(Comment):---BASIC SETTINGS---}
{=(Comment):Here, you can change your prefix, command/tag name, the blacklisted role (completed), and the message displayed to those who already completed the quiz.}
{=(pref):!}
{=(cdn):quiz}
{=(alreadyr):642583784881127466}
{=(alreadym):{user}, you already completed the quiz!}

{=(title):Server Quiz}
{=(intro):Here are some questions before you join the rest of the server:}

{=(instructions):Respond using !quiz [Q1's answer] [Q2's answer] [...]}

{=(Comment):---QUESTIONS STUFF---}
{=(Comment):Put your questions below. Also specify if the questions are required to answer or can be skipped. Put "yes" if they are required and "no" if not in the qnr variables.}

{=(Comment):QUESTION 1:}
{=(q1):Get access to a journal?}
{=(q1c1):Yes}
{=(q1c2):No}

{=(q1req):no}

{=(Comment):QUESTION 2:}
{=(q2):Your Gender?}
{=(q2c1):Male}
{=(q2c2):Female}
{=(q2c3):Other}
{=(q2req):no}

{=(Comment):QUESTION 3:}
{=(q3):Pokémon version?}
{=(q3c1):Red}
{=(q3c2):Gold | Silver | Crystal}
{=(q3c3):Fire Red | Leaf Green}
{=(q3req):yes}

{=(Comment):QUESTION 4:}
{=(q4):Game system?}
{=(q4c1):Gameboy}
{=(q4c2):DS | 3DS | 2DS}
{=(q4c3):Switch}
{=(q4c4):Emulator}
{=(q4req):yes}

{=(Comment):Roles IDs for every question's answer/choice.}
{=(q1rc1):670207487969853440}
{=(q1rc2):670207632685924355}

{=(q2rc1):670207721269887026}
{=(q2rc2):670207740244787201}
{=(q2rc3):670207760411131914}

{=(q3rc1):670108564790181897}
{=(q3rc2):670108487388495872}
{=(q3rc3):670108456883322919}

{=(q4rc1):670108976205004845}
{=(q4rc2):670109046887415818}
{=(q4rc3):670109074364301332}
{=(q4rc4):670108993854767143}

{=(Comment):---CODE STUFF---}
{=(Comment):Don't touch anything below, unless you know what you're doing.}
{=(q1rid):{q1rc1}~{q1rc2}~{q1rc3}}

{=(sep):__⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀__}

{=(urid):{user(roleids)}}

{=(l1):{lower:{1}}}
{=(l2):{lower:{2}}}
{=(l3):{lower:{3}}}
{=(l4):{lower:{4}}}

{=(q1pch):{q1c1}~{q1c2}}
{=(q1ch1):{if({l1}=={lower:{q1c1}}):true}}
{=(q1ch2):{if({l1}=={lower:{q1c2}}):true}}

{=(q2pch):{q2c1}~{q2c2}~{q2c3}}
{=(q2ch1):{if({l2}=={lower:{q2c1}}):true}}
{=(q2ch2):{if({l2}=={lower:{q2c2}}):true}}
{=(q2ch3):{if({l2}=={lower:{q2c3}}):true}}

{=(q3pch):{q3c1}~{q3c2}~{q3c3}}
{=(q3ch1):{if({l3}=={lower:{q3c1}}):true}}
{=(q3ch2):{if({l3}=={lower:{q3c2}}):true}}
{=(q3ch3):{if({l3}=={lower:{q3c3}}):true}}

{=(q4pch):{q4c1}~{q4c2}~{q4c3}~{q4c4}}
{=(q4ch1):{if({l4}=={lower:{q4c1}}):true}}
{=(q4ch2):{if({l4}=={lower:{q4c2}}):true}}
{=(q4ch3):{if({l4}=={lower:{q4c3}}):true}}
{=(q4ch4):{if({l4}=={lower:{q4c4}}):true}}

{=(q1ch1r):{if({q1ch1}==true):+{q1rc1}}}
{=(q1ch2r):{if({q1ch2}==true):+{q1rc2}}}

{=(q2ch1r):{if({q2ch1}==true):+{q2rc1}}}
{=(q2ch2r):{if({q2ch2}==true):+{q2rc2}}}
{=(q2ch3r):{if({q2ch3}==true):+{q2rc3}}}

{=(q3ch1r):{if({q3ch1}==true):+{q3rc1}}}
{=(q3ch2r):{if({q3ch2}==true):+{q3rc2}}}
{=(q3ch3r):{if({q3ch3}==true):+{q3rc3}}}

{=(q4ch1r):{if({q4ch1}==true):+{q4rc1}}}
{=(q4ch2r):{if({q4ch2}==true):+{q4rc2}}}
{=(q4ch3r):{if({q4ch3}==true):+{q4rc3}}}
{=(q4ch4r):{if({q4ch4}==true):+{q4rc4}}}

{=(roletogive):{q1ch1r} {q1ch2r} {q2ch1r} {q2ch2r} {q2ch3r} {q3ch1r} {q3ch2r} {q3ch3r}  {q3ch4r} {q4ch1r} {q4ch2r} {q4ch3r} {q4ch4r}}

{delete}{override}{silence}
{blacklist({alreadym}):{alreadyr}}

{=(test):{if({args}!=):Thank you for completing the quiz!|Please specify your responses.}}
{break({args}==):}
{c:role custom {user(id)} {roletogive} +{alreadyr}}

{=():}
{{if({args}!=):c:role custom {user(id)} {roletogive} +{alreadyr}}}

Embed

1 line
{"color": 5198940, "title": "{title}", "fields": [{"name": "Q1. {q1}", "value": "{q1c1}\n{q1c2}", "inline": true}, {"name": "Q2. {q2}", "value": "{q2c1}\n{q2c2}\n{q2c3}", "inline": true}, {"name": "⠀", "value": "⠀", "inline": false}, {"name": "Q3. {q3}", "value": "{q3c1}\n{q3c2}\n{q3c3}", "inline": true}, {"name": "Q4. {q4}", "value": "{q4c1}\n{q4c2}\n{q4c3}\n{q4c4}", "inline": true}], "footer": {"text": "{instructions}"}, "description": "{intro}"}
Raw JSON
{
  "id": 112354,
  "created_at": "2020-01-24T09:52:53.000Z",
  "tag_name": "quiz",
  "nsfw": false,
  "owner_id": "281397769716105216",
  "uses": 25,
  "description": "Instead of using reaction roles, I wanted to have a cute little quiz as a verification process.\nI wanted the questions to be answered individually, initially.\nIn this version, the initial quiz is resent after the roles are assigned.\nAt the end of the quiz, it's supposed to assign a role that blocks the user from triggering the quiz again. But instead it assigns it when the quiz is triggered.\n\nPlease help!",
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "642580799673335868",
  "sharer": "281397769716105216",
  "content": "{=(Comment):---BASIC SETTINGS---}\n{=(Comment):Here, you can change your prefix, command/tag name, the blacklisted role (completed), and the message displayed to those who already completed the quiz.}\n{=(pref):!}\n{=(cdn):quiz}\n{=(alreadyr):642583784881127466}\n{=(alreadym):{user}, you already completed the quiz!}\n\n{=(title):Server Quiz}\n{=(intro):Here are some questions before you join the rest of the server:}\n\n{=(instructions):Respond using !quiz [Q1's answer] [Q2's answer] [...]}\n\n{=(Comment):---QUESTIONS STUFF---}\n{=(Comment):Put your questions below. Also specify if the questions are required to answer or can be skipped. Put \"yes\" if they are required and \"no\" if not in the qnr variables.}\n\n{=(Comment):QUESTION 1:}\n{=(q1):Get access to a journal?}\n{=(q1c1):Yes}\n{=(q1c2):No}\n\n{=(q1req):no}\n\n{=(Comment):QUESTION 2:}\n{=(q2):Your Gender?}\n{=(q2c1):Male}\n{=(q2c2):Female}\n{=(q2c3):Other}\n{=(q2req):no}\n\n{=(Comment):QUESTION 3:}\n{=(q3):Pokémon version?}\n{=(q3c1):Red}\n{=(q3c2):Gold | Silver | Crystal}\n{=(q3c3):Fire Red | Leaf Green}\n{=(q3req):yes}\n\n{=(Comment):QUESTION 4:}\n{=(q4):Game system?}\n{=(q4c1):Gameboy}\n{=(q4c2):DS | 3DS | 2DS}\n{=(q4c3):Switch}\n{=(q4c4):Emulator}\n{=(q4req):yes}\n\n{=(Comment):Roles IDs for every question's answer/choice.}\n{=(q1rc1):670207487969853440}\n{=(q1rc2):670207632685924355}\n\n{=(q2rc1):670207721269887026}\n{=(q2rc2):670207740244787201}\n{=(q2rc3):670207760411131914}\n\n{=(q3rc1):670108564790181897}\n{=(q3rc2):670108487388495872}\n{=(q3rc3):670108456883322919}\n\n{=(q4rc1):670108976205004845}\n{=(q4rc2):670109046887415818}\n{=(q4rc3):670109074364301332}\n{=(q4rc4):670108993854767143}\n\n{=(Comment):---CODE STUFF---}\n{=(Comment):Don't touch anything below, unless you know what you're doing.}\n{=(q1rid):{q1rc1}~{q1rc2}~{q1rc3}}\n\n{=(sep):__⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀__}\n\n{=(urid):{user(roleids)}}\n\n{=(l1):{lower:{1}}}\n{=(l2):{lower:{2}}}\n{=(l3):{lower:{3}}}\n{=(l4):{lower:{4}}}\n\n{=(q1pch):{q1c1}~{q1c2}}\n{=(q1ch1):{if({l1}=={lower:{q1c1}}):true}}\n{=(q1ch2):{if({l1}=={lower:{q1c2}}):true}}\n\n{=(q2pch):{q2c1}~{q2c2}~{q2c3}}\n{=(q2ch1):{if({l2}=={lower:{q2c1}}):true}}\n{=(q2ch2):{if({l2}=={lower:{q2c2}}):true}}\n{=(q2ch3):{if({l2}=={lower:{q2c3}}):true}}\n\n{=(q3pch):{q3c1}~{q3c2}~{q3c3}}\n{=(q3ch1):{if({l3}=={lower:{q3c1}}):true}}\n{=(q3ch2):{if({l3}=={lower:{q3c2}}):true}}\n{=(q3ch3):{if({l3}=={lower:{q3c3}}):true}}\n\n{=(q4pch):{q4c1}~{q4c2}~{q4c3}~{q4c4}}\n{=(q4ch1):{if({l4}=={lower:{q4c1}}):true}}\n{=(q4ch2):{if({l4}=={lower:{q4c2}}):true}}\n{=(q4ch3):{if({l4}=={lower:{q4c3}}):true}}\n{=(q4ch4):{if({l4}=={lower:{q4c4}}):true}}\n\n{=(q1ch1r):{if({q1ch1}==true):+{q1rc1}}}\n{=(q1ch2r):{if({q1ch2}==true):+{q1rc2}}}\n\n{=(q2ch1r):{if({q2ch1}==true):+{q2rc1}}}\n{=(q2ch2r):{if({q2ch2}==true):+{q2rc2}}}\n{=(q2ch3r):{if({q2ch3}==true):+{q2rc3}}}\n\n{=(q3ch1r):{if({q3ch1}==true):+{q3rc1}}}\n{=(q3ch2r):{if({q3ch2}==true):+{q3rc2}}}\n{=(q3ch3r):{if({q3ch3}==true):+{q3rc3}}}\n\n{=(q4ch1r):{if({q4ch1}==true):+{q4rc1}}}\n{=(q4ch2r):{if({q4ch2}==true):+{q4rc2}}}\n{=(q4ch3r):{if({q4ch3}==true):+{q4rc3}}}\n{=(q4ch4r):{if({q4ch4}==true):+{q4rc4}}}\n\n{=(roletogive):{q1ch1r} {q1ch2r} {q2ch1r} {q2ch2r} {q2ch3r} {q3ch1r} {q3ch2r} {q3ch3r}  {q3ch4r} {q4ch1r} {q4ch2r} {q4ch3r} {q4ch4r}}\n\n{delete}{override}{silence}\n{blacklist({alreadym}):{alreadyr}}\n\n{=(test):{if({args}!=):Thank you for completing the quiz!|Please specify your responses.}}\n{break({args}==):}\n{c:role custom {user(id)} {roletogive} +{alreadyr}}\n\n{=():}\n{{if({args}!=):c:role custom {user(id)} {roletogive} +{alreadyr}}}",
  "embed": "{\"color\": 5198940, \"title\": \"{title}\", \"fields\": [{\"name\": \"Q1. {q1}\", \"value\": \"{q1c1}\\n{q1c2}\", \"inline\": true}, {\"name\": \"Q2. {q2}\", \"value\": \"{q2c1}\\n{q2c2}\\n{q2c3}\", \"inline\": true}, {\"name\": \"⠀\", \"value\": \"⠀\", \"inline\": false}, {\"name\": \"Q3. {q3}\", \"value\": \"{q3c1}\\n{q3c2}\\n{q3c3}\", \"inline\": true}, {\"name\": \"Q4. {q4}\", \"value\": \"{q4c1}\\n{q4c2}\\n{q4c3}\\n{q4c4}\", \"inline\": true}], \"footer\": {\"text\": \"{instructions}\"}, \"description\": \"{intro}\"}",
  "last_fetched": "2026-10-20T20:53:41.323Z"
}