Hi, does anyone know about a Trivia command?

I been looking for how to do it since i saw it in someone’s channel, I would appreciate any help :pray:t2:

how do u wish it to function?

I want it to be able to ask a question (by using the !trivia command or something like that), and then if someone in the chat gives the correct answer it can be detected, and not repeat the same question over and over again. If possible I want to add my own questions, because I need them in Spanish :sweat_smile:

yes, it can be done… i can’t work on it right now tho, but i’ll get back to u in a day or 2 ^^ unless somebody else helps before i can… but in the mean time, do u want to reuse the same question again later, or once u use it, then it’s gone?

Oh tysm, take the time you need :blush: I was thinking of putting for example 10 questions, and that the command just follows the order, and until the last one is answered then it starts over, you know what I mean? haha

so sorry for the delay… got a new computer and crazy roomies, lol…

To get the tokens needed for this command please go here https://twitch.center/customapi/quote/generate and find the 8 and 16 digit tokens.
They are after “token=” and before “&data” the 8 digit one is your PUBLIC_TOKEN and is free to share, your 16 digit one is you PRIVATE_TOKEN and should not be shared.

for the !trivia command

$(eval a=`$(urlfetch https://twitch.center/customapi/delquote?token=PRIVATE_TOKEN&data=2)`.split(`@@`);`${a[1]} ${a[2]}`)

and that needs to be aliased to this one which i would call _!trivia

$(eval a=`$(urlfetch https://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=@@$(1)@@$(2))`;b=`$(urlfetch https://twitch.center/customapi/editquote?token=PRIVATE_TOKEN&data=1%20$(2))`;d=`$(1)`;d.split(`@`).join(` `))

and then to add trivia questions and answers !triviadd (or whatever u wanna name it)

$(urlfetch https://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=@@$(eval `$(query)`.split(` `).join(`@`)))

now, to add your questions and answers… the first one will get deleted, so just put anything, it doesn’t matter, but it does need a place holder for the first one… after that, u add your questions and answers with @@ between them without spaces… so if your question is “what color is the sky?” and your answer is “blue” u would type "!triviadd what color is the sky?@@blue"… or if your question is “what r my favorite fruits?” and your answer is “pears and oranges” u would type "!triviadd what r my favorite fruits?@@pears and oranges"

and last but not least, u need an !answer command (or whatever u wanna call it) for users to guess the answer

$(eval a=`$(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&no_id=1&data=1)`.split(`@`).join(` `);`$(query)`.includes(a)?`$(user) knows their stuff, cause they are correct! PogChamp`:`Sorry $(user), that is not the answer we were looking for. FeelsBadMan`)

and u can change the responses… i would guess u’d want them in spanish… just make sure not to get rid of the symbols before and after each response

1 Like

oh, and just in case u need a delete command…

$(eval a=`$(urlfetch https://twitch.center/customapi/delquote?token=PRIVATE_TOKEN&data=$(querystring))`.split(`@`).join(` `);a)
1 Like

You are amazing, THANK YOU!
I’m going to get on it rn! :smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.