Making a counter reset automatically after it gets to a certain number

Asked Mar 2, 2020·1 reply·Last activity 6 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

So I want to make a command that uses $(count) to count up to a number and then resets itself but I can't get it to work with an if else statement in $(eval) I've done it like this:

!addcom !counter $(eval var a = $(count); if(a<=3){r = 'That is ' + a + ' out of 3'} else{r = '-a=!commands edit !counter \-c=0'}; r;)

That doesn't work it just outputs the second part in full after the counter gets past 3 without changing the counter and I'm not sure how to fix that, also sorry for my bad formatting I'm new to coding. Let me know if this is possible, thanks for the help in advance!

1 reply

Hey @Stormy Lobster!

Sorry but Nightbot can't call another command unless you're using an alias, but they're not meant for that type of use anyway. What you're asking for isn't possible as far as I know.