Hey @elendriai!
While RokettoJanpu’s solution is great, I have a solution that only uses Nightbot without an API, as it’s seems to be what’s interesting you.
Here are the commands:
• !deaths
!addcom !deaths $(twitch $(channel) "$(channel) died 0 times playing {{game}}.")
Displays the number of deaths, can be used by anyone.
The following commands are for moderators only:
• !adddeath
!addcom !adddeath -ul=mod -a=!editcom !deaths $(twitch $(channel) "$(channel) died $(count) times playing {{game}}.")
Use this command when you want to add 1 (one) death.
• !setdeath
!addcom !setdeath -ul=mod -a=!editcom !adddeath \-c=$(eval $(1)-1)
Use this command to set the number of death to where you want it to be.
Call !deaths
to know where you are, let’s say you are at 47 deaths and you want to add 3 deaths, then call !setdeath 50
(since 47+3=50), and next call !adddeath
to finalize the update, now !deaths
should display 50 deaths.
• !resetdeath
!addcom !resetdeath -ul=mod -a=!editcom !adddeath \-c=0
Use this command to reset the death counter.
• !zerodeath
!addcom !zerodeath -ul=mod -a=!editcom !deaths $(twitch $(channel) "$(channel) died 0 times playing {{game}}.")
Use this command to reset the !deaths
message if you want to have it at 0 right at the start, otherwise the message will be updated on the next first death.
I hope this is closer to what you wanted.