Count only the amount of times a mod or owner uses a command

Asked Jul 30, 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 my streamer does squats on stream and wants nightbot to keep count by using !squat. however nightbot counts everytime !squat is used by everyone even if only mods/owner can use them. is there a way to only count the amount of time a mod/owner uses the command?

Do 10 squats has been redeemed $(count) times for a total of $(eval 10 * $(count) -10) squats today! The squat cult has been satisfied!

1 reply

You could have a separate command like !addsquat that can only be called by a mod and adds ten squats

Example:
!addcom !addsquat -ul=moderator -a=!editcom !squat $(channel) has done $(eval var count=$(count);Math.floor(count*10)) squats!
!addcom !squat $(channel) has done x squats!