I been looking for how to do it since i saw it in someone's channel, I would appreciate any help ππ»
Hi, does anyone know about a Trivia command?
8 replies
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 π
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
js$(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
js$(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)
js$(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
jsβ
jsβ$(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
Didn't find your answer? The community is on Discord.
Ask on Discord