Reset for countup command


I have a countup timer running. It’s a “time since last death” timer. But I find myself having to delete and re-add it with every death. Is there a way to reset it so it grabs the current time?

Right now it’s:
!commands add !deathtimer $(countup Jul 13 2017 11:57:20 CET) Since my last death.

(I looked around, but couldn’t find anything that deals with this)


Not sure if this is the best way to get the current date & time, someone correct me if theres a better way, but this seems to work:

Setup a default !deathtimer, so we can edit it later
!commands add !deathtimer No deaths yet.

Setup a !setdeath, use this command when you die, it will reset the !deathtimer command, probably want to make this mod/owner only.
!commands add !setdeath -ul=moderator -a=!commands edit !deathtimer $(eval var d = new Date(); '$'+ '(countup ' + (d.getMonth()+1) +' '+ d.getDate() +' '+ d.getFullYear() +' '+ d.toLocaleTimeString() + ' Etc/GMT+4) since my last death.')

1 Like

Works like a charm! Thanks a bunch!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.