NightDev Community Forums

How to reset counter?

I am using Nightbot with Discord and I think it works a bit differently. The solutions to this problem don’t seem to work in Discord.

I want to reset the counter command with a different command. I have an !join command that counts.

But something like this:

!commands add !clearjoin -a=!commands edit !join -c=0

Doesn’t work in Discord. Any help? I know very little about this.

it’s trying to apply the -c=0 to your current command, you need to escape it. \-c=0, so it should in full, look like this:

!commands add !clearjoin -a=!commands edit !join \-c=0

I am using Nightbot with Discord and I think it works a bit differently. The solutions to this problem don’t seem to work in Discord.

Nightbot commands work the same on discord and twitch.

Thanks a lot for your response, but after typing !clearjoin, the !join command just keeps counting wherever it was at. I have just copied and pasted your line. Did I put it in the wrong place maybe?

sorry, i had a mistake in the first one, !join should just have $(count) and !clearjoin is what i posted.

That having been said you are doing this in a semi-weird way for a count. You can see another solution i have made here, where the !joins command wont count up until you actually tell it to: How to make a "!deaths" command?

I am doing something wrong somewhere. The purpose of this count is to keep track of groups up to a max of 6, which is why I want to clear it.

This is what I have now:

!join $(touser) joined the activity. There are $(count) participants.

!clear !commands add !clear -a=!commands edit !join -c=0

What I am doing wrong? It just keeps counting. I appreciate the help.

Just paste this into your chat like Slikrick said and you should be good.

!commands add !clear -a=!commands edit !join \-c=0

I apologize for being unclear, but I truly do not know much about this, so when you guys tell me the solution, I follow it directly. I think you are assuming I know where to put things, but I truly do not.

Adding that line to chat gives me this: @Zevvion -> There was an error adding the command. Error: command name already exists.

I appreciate the help.

No worries. Assuming you already have nightbot in your discord, you can just type it anywhere in the discord.
You are getting that message because you already have the previous command that didn’t work, with the same name, so just paste this into your discord instead:

!commands edit !clear -a=!commands edit !join \-c=0

I don’t get why that worked, but it did. Thanks a lot for the help.

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