mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
6895a37104
i totally did not used the search icon thing in vscode
20 lines
790 B
JavaScript
20 lines
790 B
JavaScript
/* eslint-disable max-len */
|
|
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: function(bot) {
|
|
bot.tellraw('@a', ['', {text: 'The bot\'s uptime is ', color: 'white'}, {text: `${secondsToHms(Math.floor(performance.now() / 1000))}`, color: 'green'}]);
|
|
},
|
|
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]});
|
|
},
|
|
};
|