Wins and kill counter

Hello everyone i need a counter for wins and kills both together { 1wins (12k) } if and one could help i will be thankful.


This is possible using ehsankia’s quote custom API - 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 below:
!addwin which adds a win to the running score (mod-only)
!addkill which adds a kill to the running score (mod-only)
!score which displays the numbers of wins and kills

Either copy and paste these commands into chat or add them through the Nightbot dashboard. Add the commands through chat only if you are sure no one else is there, otherwise they might see your private token (which is used to edit the list)! Replace PUBLIC_TOKEN with your public token and PRIVATE_TOKEN with your private token.

!addcom -ul=mod !addwin $(eval a=`$(urlfetch`;` `) $(channel) just won a game! rooPog
!addcom -ul=mod !addkill $(eval a=`$(urlfetch`;` `) $(channel) just got a kill! rooDevil
!addcom -cd=5 !score $(eval a=`$(urlfetch json`;w=a.match(/win/g)!=null?a.match(/win/g).length:0;k=a.match(/kill/g)!=null?a.match(/kill/g).length:0;`$(channel) has ${w} wins and ${k} kills.`)

Feel free to change the responses of !addwin and !addkill just as long as the $(eval) variables remain untouched!

thanks a lot man it works perfectly but what about reset command?!

Here’s a !reset command (mod-only). Replace PRIVATE_TOKEN with your private token:

!addcom -ul=mod !reset $(eval a=`$(urlfetch`;` `) $(user) has cleared the score!

thx a lot it works perfectly

Im starting to stream and all of this is new too me . I want to have a kill and win counter on my twitch with nightbot without having myself to manually input . I don’t know what is private_token , public_token or api and where to put these commands can someone help please and thank you


Unfortunately Nightbot cannot know when you’ve completed a game so it cannot automatically increase these counters. You’ll have to run these commands yourself for each game you play.

The public and private tokens you must generate are used to manage the values of the win and kill counters. The commands you see in the grey box in my original post are meant to be copied and pasted into chat (with PUBLIC_TOKEN replaced with your public token and PRIVATE_TOKEN replaced with your private token).


Nevermind i figured it out thank you

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