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

38 lines
1.6 KiB
TypeScript
Raw Normal View History

2023-06-04 21:13:15 +00:00
import { ColorResolvable, EmbedBuilder } from "discord.js";
import RadioClient from "../../Client";
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) {
2023-06-04 02:48:42 +00:00
let message: any = {};
2020-08-25 06:30:24 +00:00
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, ''))
2023-06-04 21:13:15 +00:00
.setColor(client.config.embedColor as ColorResolvable)
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
};