2023-06-04 21:13:15 +00:00
|
|
|
import { ColorResolvable, EmbedBuilder } from "discord.js";
|
|
|
|
import RadioClient from "../../Client";
|
2021-09-05 00:17:21 +00:00
|
|
|
|
2023-06-04 01:29:42 +00:00
|
|
|
export default {
|
2020-08-25 06:30:24 +00:00
|
|
|
name: 'status',
|
|
|
|
description: 'Bot Status',
|
|
|
|
category: 'info',
|
2023-06-04 21:13:15 +00:00
|
|
|
async execute(interaction: any, client: RadioClient) {
|
2020-08-25 06:30:24 +00:00
|
|
|
|
2023-06-05 22:39:35 +00:00
|
|
|
if(!client.user) return interaction.reply({
|
2023-06-05 23:27:46 +00:00
|
|
|
content: client.messages.emojis["error"] + client.messages.maintenance,
|
2023-06-05 22:39:35 +00:00
|
|
|
ephemeral: true
|
|
|
|
});
|
|
|
|
|
|
|
|
let uptime = client.funcs.msToTime(client.uptime || 0);
|
2020-08-25 06:30:24 +00:00
|
|
|
|
2022-07-18 20:44:19 +00:00
|
|
|
const embed = new EmbedBuilder()
|
2023-06-06 03:04:28 +00:00
|
|
|
.setTitle(client.messages.replace(client.messages.statusTitle, {
|
|
|
|
"%client.user.username%": client.user.username
|
|
|
|
}))
|
2023-06-05 23:27:46 +00:00
|
|
|
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messages.emojis["logo"].replace(/[^0-9]+/g, ''))
|
2023-06-04 21:13:15 +00:00
|
|
|
.setColor(client.config.embedColor as ColorResolvable)
|
2023-06-05 22:39:35 +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-06-05 22:39:35 +00:00
|
|
|
])
|
2021-09-03 00:46:44 +00:00
|
|
|
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
|
2022-04-06 09:35:58 +00:00
|
|
|
.setFooter({
|
|
|
|
text: client.messages.footerText,
|
2023-06-05 23:27:46 +00:00
|
|
|
iconURL: "https://cdn.discordapp.com/emojis/" + client.messages.emojis["eximiabots"].replace(/[^0-9]+/g, '')
|
2022-04-06 09:35:58 +00:00
|
|
|
});
|
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
|
|
|
};
|