diff options
Diffstat (limited to 'commands/utility/uptime.cjs')
| -rw-r--r-- | commands/utility/uptime.cjs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/commands/utility/uptime.cjs b/commands/utility/uptime.cjs new file mode 100644 index 0000000..34b073c --- /dev/null +++ b/commands/utility/uptime.cjs @@ -0,0 +1,28 @@ +const { Command } = require('discord.js-commando'); +const upTime = require('moment'); +require('moment-duration-format'); +const emoji = require('emoji-random'); + +module.exports = class UptimeUtility extends Command { + constructor(client) { + super(client, { + name: 'uptime', + aliases: ['ut'], + group: 'utility', + memberName: 'uptime', + description: 'Tells you how long the bot has been online.', + throttling: { + usages: 5, + duration: 30 + }, + examples: [ + 'msb!uptime', + 'msb!ut' + ] + }); + } + run(msg) { + const duration = upTime.duration(this.client.uptime).format(" D [days], H [hrs], m [mins], s [secs]"); + msg.reply(duration + ' ' + emoji.random()); + } +};
\ No newline at end of file |