NightDev Community Forums

Need help with a counter command

I wrote a command to track how many times a specific viewer has been screwed over by their phone’s autocorrect. I set it up using 2 commands, an !autocorrect and !addauto. They commands were made as follows:

!commands add !autocorrect User has been fucked by autocorrect 0 times. 
NotLikeThis
!commands add !addauto -a=!commands edit !autocorrect User has been fucked by autocorrect $(count) times. 
NotLikeThis

When I (a moderator) use the !addauto command, I get the notification from nightbot that the command has been edited successfully, and the !autocorrect displays the correct count number. When anyone else uses it, Nightbot just spits out the link for the available commands. In the dashboard, however, the counter shows as incrementing when another user executes !addauto. The !autocorrect command is just not updated until a moderator uses the !addauto command.

How do I fix this? Or is there a better solution? I’d like for him to be able to edit his own counter without having to mod him, but also to simply display the count without incrementing it.

1 Like

Hey @sublyminality!

Commands such as !commands add, !commands delete, !commands edit, !addcom, !delcom, and !editcom are mod+ by default, you can change that behavior in the dashboard, but it’s really not recommended.

When a non-mod+ user calls !commands OPTION they get the commands list link instead, and nothing changes.

Usually commands like your !addauto are set to be mod+ only, so the counter goes up only when someone who can use !commands edit calls it.

So to answer your problem, either you make the person a moderator, or you rely on your current moderators to increment the counter every time an autocorrect mistake happens, there are no other solution.