Win counter / add win / reset

Hi guys,

I have been trying to figure this out for a while but cannot get it to work. I’m hoping it’s a simple fix for someone with a bit more knowledge than myself.

I am trying to create three commands;

  1. !wins - Displays to viewers how many wins I have for that stream
  2. !addwin - Mods can use this to +1 wins to the !wins command
  3. !resetwins - Mods can use this to reset the win counter to 0. At the end of the game or if I switch games say.

So far I have,

!commands add !wins Dunn has won 0 times
!commands add !addwins -a=!commands -ul=moderator edit !wins Dunn has won $(count) times
!commands add !resetcounter -a=!commands -ul=moderator edit !addwins -c=0

Would anyone be able to help me with this one please?


Hey @dunnstopher!

Please use the search bar before opening a new topic.

Hi @Emily . Thanks for the reply. I had tried searching before posting but keep coming up with the same issue. I’m guessing that nothing can be done about it if you are pointing me at that thread.

That thread uses the commands;
!addcom !deaths Professor Webneck has failed his test 0 times.
!addcom !deathadd -ul=mod -a=!editcom !deaths $(twitch $(channel) “Professor Webneck has failed his test at {{game}} $(count) times.”)
!addcom !deathreset -ul=mod -a=!editcom !deathadd -c=0

which give similar results to my initial post.

The issue/scenario that I keep getting is as below;
!deaths = displays that i have 0 deaths
!deathadd = adds +1 deaths
!deaths = displays that i have 1 death (as expected)
!deathreset= states that ‘adddeaths’ has been edited
!deaths = still displays that i have 1 death instead of 0

Is there a way so that if a mod resets the death counter, a new person joins chat and types !deaths that it would display 0 deaths rather than the original count before the reset?

I hope that makes sense.


Ah yes, I see, you need to add yet another command:

!addcom !zerodeath -ul=mod -a=!editcom !deaths Professor Webneck has failed his test 0 times.

Because !deathadd edits !deaths, and when you call !deathreset it only resets the !deathadd counter, not the message !deathadd stores in !deaths, so you need another command to edit that content too: !zerodeath.

I know that it makes a lot of commands to call, but it can’t be done differently, unfortunately.

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