eximiabots-radiox/src/client/commands/status.ts

37 lines
1.5 KiB
TypeScript
Raw Normal View History

2022-07-18 20:44:19 +00:00
import { EmbedBuilder } from "discord.js";
2020-08-25 06:30:24 +00:00
module.exports = {
name: 'status',
description: 'Bot Status',
category: 'info',
async execute(interaction, client) {
2020-08-25 06:30:24 +00:00
let message = {};
message.statusTitle = client.messages.statusTitle.replace("%client.user.username%", client.user.username);
let uptime = client.funcs.msToTime(client.uptime);
2020-08-25 06:30:24 +00:00
2022-07-18 20:44:19 +00:00
const embed = new EmbedBuilder()
2020-08-25 06:30:24 +00:00
.setTitle(message.statusTitle)
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["logo"].replace(/[^0-9]+/g, ''))
.setColor(client.config.embedColor)
2023-05-23 23:41:26 +00:00
.addFields(
2022-07-18 20:44:19 +00:00
{ name: client.messages.statusField1, value: uptime },
{ name: client.messages.statusField2, value: client.config.version },
{ name: client.messages.statusField3, value: Date.now() - interaction.createdTimestamp + "ms" },
2023-05-23 23:41:26 +00:00
{ name: client.messages.statusField4, value: client.ws.ping.toString() },
2022-07-18 21:55:41 +00:00
{ name: client.messages.statusField5, value: client.config.hostedBy }
2023-05-23 23:41:26 +00:00
)
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
.setFooter({
text: client.messages.footerText,
iconURL: "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, '')
});
2021-08-26 19:06:15 +00:00
interaction.reply({
embeds: [embed],
ephemeral: true
});
2020-08-25 06:30:24 +00:00
2020-08-25 10:50:39 +00:00
}
2021-09-09 09:44:50 +00:00
};