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`)
But dont i have to !addcom -cd=5 !totalwins? I want a !totalwin command and i also want to add those win
i have now. And then i want when i !addwin it will count in the wins i allready have in !totalwins…
My english isnt that good… i have hard to explain in english So i hope you understand.
New batch of commands, rewritten so that it keeps track of both a per-stream and all-time number of wins. 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~0~`:``))
!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 json https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN)`.match(/~\d+K~\d+~/g);a?(a=a.filter(x=>x.split(`~`)[2]==a[a.length-1].split(`~`)[2]&&x.split(`~`)[1]!=`0K`),b=a.length,c=a.length?`(`+a.map(x=>x.split(`~`)[1]).join(`, `)+`)`:``):(b=0,c=``);`$(channel) has ${b} wins ${c}`)
!addcom -cd=5 !totalwins $(eval a=`$(urlfetch https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN)`.match(/~\d+K~\d+~/g);`$(channel) has ${a?a.filter(x=>x.split(`~`)[1]!=`0K`).length:0} wins`)
!addcom !resetwins -a=!editcom !addwin $(eval `$(urlfetch https://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=~0K~$(count)~)`;"$"+"(eval a=parseInt(decodeURIComponent(`$"+"(querystring)`),10);`PRIVATE_TOKEN`+(a>=0?`&data=~${a}K~$(count)~`:``))")