Command for "days without fuckups"

I’m new to nightbot and i’m trying to create a command that dysplays the following:
“We have been working for (days,hours,minutes) without fuckups. Our previous record is (days,hours,minutes).”
What I’ve got so far is the following code:

eval(function rec(){
var record=0
if ($(countup Nov 04 2020 04:00:00 PM Etc/GMT+3)>record){
record=$(countup Nov 04 2020 04:00:00 PM Etc/GMT+3)}
return record})

I’m having trouble finding out:
*how to pass info from an already existing command (such as the countup previously mentioned) as an argument for the whole function
*how to have the record saved somehow for use for the same command

Are any of those possible? Is there a way to do what I want without doing those?
Thanks for any help beforehand.

Check here: [CustomAPI] Quote system

I will say however the command your trying to make is gonna be pretty complicated so if your having any trouble feel free to say so.

Thank you. I’ll check. Thanks for making yourself available :smile:

I gave it a quick look over, I’m a little confused.
I’m not sure I understand what you’re suggesting.
Just to be sure, I understood it as a suggestion to put quotes with the countup and record.
Or are you suggesting I make an separate API?

It’s a suggestion to use it to store the data.

Ah okay so that solves problem number 2 basically.
Then you’re saying what is going to be hard is finding a way to trow that inside what I’m coding as argument right?

What’s going to be hard is storing the record it’s possible but won’t be easy just considering leap years and stuff

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