diff options
| author | 8cy <[email protected]> | 2020-04-13 03:54:31 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-04-13 03:54:31 -0700 |
| commit | 3733f7575faba8a06cc65c8eaf3612f80f46a44b (patch) | |
| tree | a9ecd915e5749b960efbae5dd32307b9f998428c /commands/utility/uptime.cjs | |
| parent | fix join, v1.1.1 (diff) | |
| download | minecraftsoundtrackbot-test.tar.xz minecraftsoundtrackbot-test.zip | |
testtest
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 |