Skip to content

Commit 746b39a

Browse files
authored
Uptime command!
Because sometimes the status command glitches out and doesn't show how long the bot has been up for!
1 parent c4e83d0 commit 746b39a

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

basicBot.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3509,7 +3509,21 @@
35093509
}
35103510
}
35113511
},
3512-
3512+
uptimeCommand: {
3513+
command: 'uptime',
3514+
rank: 'bouncer',
3515+
type: 'exact',
3516+
functionality: function (chat, cmd) {
3517+
if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0);
3518+
if (!basicBot.commands.executable(this.rank, chat)) return void (0);
3519+
else {
3520+
var launchT = basicBot.room.roomstats.launchTime;
3521+
var durationOnline = Date.now() - launchT;
3522+
var since = basicBot.roomUtilities.msToStr(durationOnline);
3523+
API.sendChat(subChat(basicBot.chat.activefor {time: since}));
3524+
}
3525+
}
3526+
},
35133527
usercmdcdCommand: {
35143528
command: 'usercmdcd',
35153529
rank: 'manager',

0 commit comments

Comments
 (0)