mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-27 09:35:35 -05:00
19 lines
852 B
JavaScript
19 lines
852 B
JavaScript
const { MessageEmbed } = require('discord.js')
|
|
const { secondsToHms } = require('../util/secondToHms')
|
|
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) {
|
|
bot.tellraw(selector, [{ text: 'The bot\'s uptime is ', color: 'white' }, { text: `${secondsToHms(Math.floor(performance.now() / 1000))}`, color: 'green' }])
|
|
},
|
|
discordExecute (bot, username, usernameraw, sender, prefix, args, channeldc, message, config) {
|
|
const Embed = new MessageEmbed()
|
|
.setColor(config.discord.embedsColors.normal)
|
|
.setTitle('Bot\'s Uptime')
|
|
.setDescription(`The bot's uptime is ${secondsToHms(Math.floor(performance.now() / 1000))}`)
|
|
channeldc.send({ embeds: [Embed] })
|
|
}
|
|
}
|