Add and subtract from a value using commands?

Asked Jun 20, 2024·2 replies·Last activity 2 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.

I'm very new to working in nightbot but I was wondering if there was any way to make a stat tracker that I can add and subtract specific amounts to? My intended commands are !gainaura, !loseaura, and !aura

Where !gainaura 50 adds 50 aura to the total, !loseaura 20 subtracts 20 from the total, and !aura shows the current updated total aura. I tried messing around using PasteBin and Google Sheets as places to store the data, and then using Nightbot to read/write, but it didn't seem to work correctly and never actually saved the updated counts back to PasteBin and such. If anyone has any suggestions, I'm very happy to learn!

2 replies

You can use something like this post however there isn't any easy way to do operations to effect other commands, so setting any value would be more manual than +30 or -10.

(link expired)

is there any way to read the $(count) of another command without having to alias from it?