Some sort of counter to track deaths that viewers can view but not change and maybe a way to reset

I’m new-ish to nightbot and I was messing around trying to get a death counter that the number could be viewed but not change with a way to reset, if someone could show me a way to do this that would be awesome! Thanks.

1 Like

Actually there is a way to do this and it’s using the $(count) variable. Your best option is to create three different commands.

One for any user to see:

!commands add !counter Current death count:

And another command to change it using an alias:

!commands add !addcounter -a=!commands edit !counter Current death count: $(count)

And a way to reset

!commands add !resetcounter -a=!commands edit !addcounter \-c=0

The use is simple, any user can use the !counter command to see the amount of deaths. And any mod (or whatever you choose) can change it using the !addcounter. You can reset the counter using !resetcounter and then !addcounter to update the original command.

Example:

Mod: !addcounter
Nightbot: The command !counter has been changed!

User: !counter
Nightbot: Current death count: 1

Mod: !resetcounter
Nightbot: The command !counter has been changed!
Mod: !addcounter
Nightbot: The command !counter has been changed!
3 Likes

This is a pretty hacky solution but it does accomplish what you were looking for, hopefully we can make this a bit easier in the future,

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