2022-08-14 05:51:45 -04:00
|
|
|
/* eslint-disable max-len */
|
2022-10-15 00:45:40 -04:00
|
|
|
const {MessageEmbed} = require('discord.js');
|
2022-08-14 05:51:45 -04:00
|
|
|
const {secondsToHms} = require('../util/secondToHms');
|
|
|
|
module.exports = {
|
|
|
|
name: 'uptime',
|
|
|
|
alias: [],
|
|
|
|
description: 'Shows the bot\'s uptime',
|
|
|
|
usage: '',
|
|
|
|
trusted: 0,
|
2022-11-16 06:41:30 -05:00
|
|
|
execute: function(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'}]);
|
2022-10-15 00:45:40 -04:00
|
|
|
},
|
|
|
|
discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc, message) {
|
|
|
|
const Embed = new MessageEmbed()
|
|
|
|
.setColor('#FFFF00')
|
|
|
|
.setTitle('Bot\'s Uptime')
|
|
|
|
.setDescription(`The bot\'s uptime is ${secondsToHms(Math.floor(performance.now() / 1000))}`);
|
|
|
|
channeldc.send({embeds: [Embed]});
|
2022-08-14 05:51:45 -04:00
|
|
|
},
|
|
|
|
};
|