This setup uses ehsankia’s quote list CustomAPI - read more about it here.
Click this link. It will generate three links and two tokens, a public token (8 characters long) and a private token (16 characters long). The public token is located within the first generated link. The private token is located within both the second and third generated links. The tokens are found after
token= and before
&data=$(querystring) Copy them and keep them somewhere safe!
I’ve set up 3 commands: !kennedy with response “$(user) gave Kennedy lovins.”, !kennedycount which returns how many times !kennedy has been used, and !kennedyreset which resets the counter value (mod-only). Either copy and paste these commands into chat OR add these commands through the Nightbot dashboard. Replace
publicTokenHere with your public token and
privateTokenHere with your private token. Add the commands through chat ONLY if you are sure no one else is there, otherwise they might see your private token!
!addcom -cd=5 !kennedy $(eval a=`$(urlfetch http://twitch.center/customapi/addquote?token=privateTokenHere&data=e)`;`$(user) gave Kennedy lovins.`)
!addcom -cd=5 !kennedycount $(eval a=`$(urlfetch json http://twitch.center/customapi/quote/list?token=publicTokenHere&no_id=1)`;b=a.charAt(0)!=`T`?a.length:`0`;`Kennedy has been given `+b+` amount of lovins tonight! She's feeling the love!`)
!addcom -ul=mod !kennedyreset $(eval a=`$(urlfetch http://twitch.center/customapi/delquote?token=privateTokenHere&clear=1)`;`$(user) has taken away all of Kennedy's love...`)