mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-23 15:47:57 -05:00
21 lines
951 B
JavaScript
21 lines
951 B
JavaScript
const { MessageEmbed } = require('discord.js')
|
|
const moment = require('moment-timezone')
|
|
module.exports = {
|
|
name: 'uptime',
|
|
alias: [],
|
|
description: 'Shows the bot\'s uptime',
|
|
usage: '',
|
|
trusted: 0,
|
|
execute (bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) {
|
|
const time = moment.utc(Math.floor(performance.now())).format('H [hours], m [minutes], s [seconds]')
|
|
bot.tellraw(selector, [{ text: 'The bot\'s uptime is ', color: 'white' }, { text: time, color: 'green' }])
|
|
},
|
|
discordExecute (bot, username, usernameraw, sender, prefix, args, channeldc, message, config) {
|
|
const time = moment.utc(Math.floor(performance.now())).format('H [hours], m [minutes], s [seconds]')
|
|
const Embed = new MessageEmbed()
|
|
.setColor(config.discord.embedsColors.normal)
|
|
.setTitle('Bot\'s Uptime')
|
|
.setDescription(`The bot's uptime is ${time}`)
|
|
channeldc.send({ embeds: [Embed] })
|
|
}
|
|
}
|