Command for "days without fuckups"

Asked Nov 10, 2020·6 replies·Last activity 5 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 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.

6 replies

Thank you. I'll check. Thanks for making yourself available 😄

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

Didn't find your answer? The community is on Discord.

Ask on Discord