Counting Down command

Asked Aug 17, 2023·3 replies·Last activity 3 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.

Hey y'all,

So I want to create a command in the channel I mod for that works like the count command variable does, but instead of going up each time the command is used, the number would go down. But I can't quite figure out how to make that work. It would be pretty cool for us if we could do that, but I'm fairly new to using nightbot so I'm not sure how to start going about that.

3 replies

r u wanting to start at a number and then count down from there, or count down from zero?...

counting down from zero is as easy as just putting a dash in front of $(count) like...

we have -$(count) lives left

but if u wanna start at a positive number and count down u can add a simple equation like...

we have $(eval 40 - $(count)) lives left

where 40 is one higher than the number u'd like to start at (the first time u use this command would say "we have 39 lives left")

Awesome okay! Is there a way that I can add a second command to see how many are left?

Okay so like if the command is say !p There are $(eval 49 -$(count)) defunded puns remaining

is there a way to make a second command like !puns that will then tell you how many we have remaining? I was trying to base it off our existing dubs command, but doing
edit !puns There are $(eval 49 -$(count)) defunded puns remaining
wasn't working. Is there a step that I'm missing here?

Wait, I figured it out just by fucking around. Thanks so much for your help!