count command nightbot

I need help.
I want to create a command that tells how many times the person has pressed the Bell, but I do not know how to do it
This is what I have so far
!commands add! bell /$(touser) pressed the bell of the shack ($(count) times)

and also requires a timer in which the user can only use the command every 30 minutes

The syntax for your command is just a bit off. Also, the maximum cooldown you can set on a command is 300 seconds (5 minutes), so that’s how I’ve set it up for you. Just copy and paste this into your chat:

!addcom -cd=300 !bell $(touser) pressed the bell of the shack ($(count) times)

1 Like

thank you for your help
I forgot to comment that the count was per person and not in total for example:
I pressed the bell 3 times
You pressed the bell 5 times.

Is this command set up for this?
Can you help me again?

This setup is not user-specific. I will privately message you what commands to add.

I’m also having trouble with the Count variable. Previously on my channel I had commands to keep track of how many times I’ve died in a game (one command to add a death and one command to check how many time I’ve died so far without adding one). The problem is that when I could not figure out how to make the latter command with Nightbot, I wound up making both of them with another bot that had a custom variables system which enabled me to increase the count of the death variable with command 1 and check the current count with command 2. Now that the bot I was using for that is no longer functioning on my channel, I’m once again trying to get it to work with Nightbot, but I’m running into the same problem I had before: I can’t manage to create a command to check the current count of another command.

So in short, what I’m trying to achieve is:
Command1: Standard counter command that adds 1 when used. I have achieved this one.
Command2: A way to check the current count of Command1 without increasing it. This is the one that eludes me. Is there any way to achieve this using Nightbot?

Is there a way to reset the counter to reflect 0? For example, if someone comes into the stream and goes to check how many times I’ve died already but I haven’t yet, I don’t want it saying 1, which seems to be the result when using the reset commands as you’ve lain out. I tried changing the reset command to -c=-1 but it just read it as 1, ignoring the negative part.

-1 does work. Try !commands add !resetcounter -a=!commands edit !addcounter \-c=-1

That’s weird then because that’s exactly what I tried and it didn’t work at first. I had to manually change the interval from the dashboard instead but it seems to be working now. Thanks for the help

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