blob: 8330fbef0737d3c90f6c25e5c69033ca5e73cdcf [file] [log] [blame]
PineaFan538d3752023-01-12 21:48:23 +00001import type { CommandInteraction } from "discord.js";
2import type { SlashCommandSubcommandBuilder } from "@discordjs/builders";
pineafan4edb7762022-06-26 19:21:04 +01003import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
pineafan63fc5e22022-08-04 22:04:10 +01004import client from "../../utils/client.js";
pineafan4f164f32022-02-26 22:07:12 +00005
6const command = (builder: SlashCommandSubcommandBuilder) =>
Skyler Grey75ea9172022-08-06 10:22:23 +01007 builder.setName("stats").setDescription("Gets the bot's stats");
pineafan4f164f32022-02-26 22:07:12 +00008
pineafanbd02b4a2022-08-05 22:01:38 +01009const callback = async (interaction: CommandInteraction): Promise<void> => {
pineafan377794f2022-04-18 19:01:01 +010010 interaction.reply({
Skyler Grey75ea9172022-08-06 10:22:23 +010011 embeds: [
12 new EmojiEmbed()
13 .setTitle("Stats")
Skyler Grey11236ba2022-08-08 21:13:33 +010014 .setDescription(`**Servers:** ${client.guilds.cache.size}\n` + `**Ping:** \`${client.ws.ping * 2}ms\``)
Skyler Grey75ea9172022-08-06 10:22:23 +010015 .setStatus("Success")
TheCodedProf4a6d5712023-01-19 15:54:40 -050016 .setEmoji("SETTINGS.STATS.GREEN")
Skyler Grey75ea9172022-08-06 10:22:23 +010017 ],
18 ephemeral: true
pineafan377794f2022-04-18 19:01:01 +010019 });
pineafan63fc5e22022-08-04 22:04:10 +010020};
pineafan4f164f32022-02-26 22:07:12 +000021
pineafanbd02b4a2022-08-05 22:01:38 +010022const check = () => {
pineafan4f164f32022-02-26 22:07:12 +000023 return true;
pineafan63fc5e22022-08-04 22:04:10 +010024};
pineafan4f164f32022-02-26 22:07:12 +000025
26export { command };
27export { callback };
Skyler Grey75ea9172022-08-06 10:22:23 +010028export { check };