From 1f245ddb081b15fbd3287aedc4f8965782e1fcc0 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 21 Oct 2017 15:43:18 -0400 Subject: Starting to work on AleeBot 2.0.0 --- commands/uptime.js | 62 ------------------------------------------------------ 1 file changed, 62 deletions(-) delete mode 100644 commands/uptime.js (limited to 'commands/uptime.js') diff --git a/commands/uptime.js b/commands/uptime.js deleted file mode 100644 index dc61369..0000000 --- a/commands/uptime.js +++ /dev/null @@ -1,62 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { -//This command was ported from AstralMod -var timeString; // What we'll eventually put into the message - -var uptime = parseInt(client.uptime); // Get uptime in ms - -uptime = Math.floor(uptime / 1000); // Convert from ms to s - -var uptimeMinutes = Math.floor(uptime / 60); // Get the uptime in minutes - -var minutes = uptime % 60; - -var hours = 0; - -while (uptimeMinutes >= 60) { - -hours++; - -uptimeMinutes = uptimeMinutes - 60; - -} - - - -if (uptimeMinutes < 10) { - -timeString = hours + ":0" + uptimeMinutes // We need to add an additional 0 to the minutes - -} else { - -timeString = hours + ":" + uptimeMinutes // We don't need to add an extra 0. - -} - - - -message.reply("It looks like AleeBot has been up for " + timeString + " hours."); - -commandProcessed = true; -} - -exports.conf = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'uptime', - - description: 'It will tell you how long AleeBot has been on for.', - - usage: 'uptime' - -}; -- cgit v1.2.3