blob: 68eeaa98d2c9423fe40a70cc8ead614b4e0d66ca [file] [log] [blame]
pineafan4f164f32022-02-26 22:07:12 +00001import { CommandInteraction } from "discord.js";
2import { 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")
14 .setDescription(
15 `**Servers:** ${client.guilds.cache.size}\n` +
16 `**Ping:** \`${client.ws.ping * 2}ms\``
17 )
18 .setStatus("Success")
19 .setEmoji("GUILD.GRAPHS")
20 ],
21 ephemeral: true
pineafan377794f2022-04-18 19:01:01 +010022 });
pineafan63fc5e22022-08-04 22:04:10 +010023};
pineafan4f164f32022-02-26 22:07:12 +000024
pineafanbd02b4a2022-08-05 22:01:38 +010025const check = () => {
pineafan4f164f32022-02-26 22:07:12 +000026 return true;
pineafan63fc5e22022-08-04 22:04:10 +010027};
pineafan4f164f32022-02-26 22:07:12 +000028
29export { command };
30export { callback };
Skyler Grey75ea9172022-08-06 10:22:23 +010031export { check };