I am trying to impliment into my nodejs script a function to allow once per 8 hours a select command.
example:
!hug <--- would let bot respond with a hug but only once every 8 hours
I've been scouring online but cannot find what I need... I am trying to get it as simplified as possible.. (i.e without mongo... etc)
setInterval
will do the job for thissetInterval(function(){ yourFunction() }, 28800000)
setInterval()
set for every 8 hours? Then you just run your node.js program, start the interval timer and it will fire every 8 hours where you can then run whatever code you want.