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.
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?
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?