mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-19 19:45:16 +00:00
28 lines
No EOL
826 B
JavaScript
28 lines
No EOL
826 B
JavaScript
const Discord = require('discord.js');
|
|
const moment = require("moment");
|
|
require("moment-duration-format");
|
|
|
|
module.exports = async (client, interaction, args) => {
|
|
const duration = moment.duration(client.uptime).format("\`D\` [days], \`H\` [hrs], \`m\` [mins], \`s\` [secs]");
|
|
const upvalue = (Date.now() / 1000 - client.uptime / 1000).toFixed(0);
|
|
|
|
client.embed({
|
|
title: `${client.emotes.normal.arrowUp}・Uptime`,
|
|
desc: `See the uptime of Bot`,
|
|
fields: [
|
|
{
|
|
name: "⌛┇Uptime",
|
|
value: `${duration}`,
|
|
inline: true
|
|
},
|
|
{
|
|
name: "⏰┇Up Since",
|
|
value: `<t:${upvalue}>`,
|
|
inline: true
|
|
}
|
|
],
|
|
type: 'editreply'
|
|
}, interaction)
|
|
}
|
|
|
|
|