blob: 19c094973aac4f64a55b293ac7dcc1afd133ab82 [file] [log] [blame]
PineaFan538d3752023-01-12 21:48:23 +00001import type { CommandInteraction } from "discord.js";
Samuel Shuert27bf3cd2023-03-03 15:51:25 -05002import type { SlashCommandSubcommandBuilder } from "discord.js";
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")
Samuel Shuert27bf3cd2023-03-03 15:51:25 -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
pineafan4f164f32022-02-26 22:07:12 +000022export { command };
23export { callback };