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

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!

Hey @Latetsicario!

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.

1 Like

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