Hey guys... Need help with something

@hardstyle75

I assume you used this forum post to create the !wins command:


I’ve rewritten the commands a little bit. Now they are called !addwin & _!addwin which adds the number of kills and a single win to the counter, and !wins which gathers the number of kills for each game won. Replace PUBLIC_TOKEN with your public token and PRIVATE_TOKEN with your private token.

!addcom -ul=mod !addwin -a=_!addwin $(eval a=parseInt(decodeURIComponent(`$(querystring)`),10);`PRIVATE_TOKEN`+(a>=0?`&data=~${a}K~`:``))

!addcom -ul=mod _!addwin $(eval a=`$(urlfetch https://twitch.center/customapi/addquote?token=$(query))`;b=decodeURIComponent(`$(querystring)`);b.includes(`PRIVATE_TOKEN`)?(a.includes(`Successfully added entry`)?`$(channel) won another game with ${b.split(`~`)[1].split(`K`)[0]} kills!`:`Invalid input!`):`Use !addwin`)

!addcom -cd=5 !wins $(eval a=`$(urlfetch https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN)`.match(/~\d+K~/g);a?(b=a.length,c=`(`+a.map(x=>x.slice(1,x.length-1)).join(`, `)+`)`):(b=0,c=``);`$(channel) has ${b} wins ${c}`)

This is a !totalwins command that only outputs the total number of wins:

!addcom -cd=5 !totalwins $(eval a=`$(urlfetch https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN)`.match(/~\d+K~/g);`$(channel) has ${a?a.length:0} wins`)