diff options
| author | Alee <alee14498@gmail.com> | 2018-02-25 14:54:37 -0500 |
|---|---|---|
| committer | Alee <alee14498@gmail.com> | 2018-02-25 14:54:37 -0500 |
| commit | 3e06bff720bd660ef41ce2e149004836595b4e40 (patch) | |
| tree | 0f66307832ceca562df3d13bbdd6fd46e4625ac5 /commands/uptime.js | |
| parent | 2297ebb012e5522ce3b8360c404f522ed30dd985 (diff) | |
| parent | 94eeeec5b7d4d29ae9d372fc1b86ce5351112548 (diff) | |
| download | AleeBot-3e06bff720bd660ef41ce2e149004836595b4e40.tar.gz AleeBot-3e06bff720bd660ef41ce2e149004836595b4e40.tar.bz2 AleeBot-3e06bff720bd660ef41ce2e149004836595b4e40.zip | |
2.0 release (I hope it will work)
Diffstat (limited to 'commands/uptime.js')
| -rw-r--r-- | commands/uptime.js | 62 |
1 files changed, 0 insertions, 62 deletions
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' - -}; |
