discord_bot/commands/info-search/uptimee.js

18 lines
591 B
JavaScript
Raw Normal View History

const { MessageEmbed } = require("discord.js");
const Discord = require("discord.js");
module.exports = {
name: "uptime",
category: "info",
description: "Zeigt die Betriebszeit des Bots an.",
usage: "uptime",
run: async (client, message, args) => {
let days = Math.floor(client.uptime / 86400000);
let hours = Math.floor(client.uptime / 3600000) % 24;
let minutes = Math.floor(client.uptime / 60000) % 60;
let seconds = Math.floor(client.uptime / 1000) % 60;
return message.channel.send(`__Uptime:__\n${days}d ${hours}h ${minutes}m ${seconds}s`);
}
}