diff options
Diffstat (limited to 'src/commands/utility/uptime.js')
| -rw-r--r-- | src/commands/utility/uptime.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/commands/utility/uptime.js b/src/commands/utility/uptime.js new file mode 100644 index 0000000..0c76754 --- /dev/null +++ b/src/commands/utility/uptime.js @@ -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: [ + 's5n!uptime', + 's5n!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 |