Timer reset for using the same command?

Hi guys, I could use a bit of assist if anyone can :slight_smile:

I’ve been trying to work on a single countup command that resets the timer when the same command is used.

For example if I do !boopreset the first time, it’ll pop out as “Streamer has been booped 0 seconds ago.”

Then if I or my mods would do !boopreset again like say after a bit of time, it’ll become “Streamer has been booped (HH:MM:SS of last !boopreset entry) ago.” and it’ll be looping on the last entry.

If anyone can help me with this, mighty appreciate it!

to do that with a single command, u’d need an api where u can store the latest time stamp each time… otherwise u could do it with multiple commands, technically it’d be 3 commands, but u’d only have to type 2 of them… like this…

!addcom !boopreset -a=!commands -ul=moderator edit !boop $(time YOUR_TIMEZONE "MM DD Y h:mm:ss a")

which will store the timestamp in a command called !boop and then…

!addcom !boop -a=!booppart2 place_holder

place_holder will be replaced by the first time stamp when u do the !boopreset command and then…

!addcom !booppart2 $(channel) has been booped $(countdown $(query) YOUR_TIMEZONE).

just don’t forget to change YOUR_TIMEZONE in both the first and third command to a proper timezone that can be found here
and to give an example, mods and up can type !boopreset to update the timestamp and then anybody can type !boop to get the “how long ago” response

1 Like

I’ll work with this in the time being, thank you!

Is there a way to develop an API for it? (I have no skills on this XD)

But I did get this first one to work!

1 Like

uh, yes, and there r other options, like u MIGHT be able to do it with pastebin, but if it is possible, idk how to update the data in the paste, i only know how to manually enter the data and have nightbot retrieve it… um… there was somebody that was using google docs to store/update/retrieve data, but i have no idea how that works either, lol…