diff options
Diffstat (limited to 'commands/utility/uptime.js')
| -rw-r--r-- | commands/utility/uptime.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/commands/utility/uptime.js b/commands/utility/uptime.js new file mode 100644 index 0000000..1fe86e9 --- /dev/null +++ b/commands/utility/uptime.js @@ -0,0 +1,24 @@ +const { Command } = require('discord.js-commando'); +const upTime = require('moment'); +require('moment-duration-format'); + +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 + }, + guildOnly: true + }); + } + run(msg) { + const duration = upTime.duration(this.client.uptime).format(" D [days], H [hrs], m [mins], s [secs]"); + msg.reply(duration); + } +};
\ No newline at end of file |