Skip to content

Commit 11d11dd

Browse files
author
Dillon Christensen
committed
added day and months to uptime
1 parent 85d8800 commit 11d11dd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ bot.hears(['uptime'], reply => {
3030
uptime = uptime / 60;
3131
unit = 'hour';
3232
}
33+
if (uptime > 24) {
34+
uptime = uptime / 24;
35+
unit = 'day';
36+
}
37+
if (uptime > 30) {
38+
uptime = uptime / 30;
39+
unit = 'month';
40+
}
3341
if (uptime != 1) {
3442
unit = unit + 's';
3543
}

0 commit comments

Comments
 (0)