blob: 255899792b26c63cb6342e8358d391d575567f83 [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) =>
7 builder
pineafan63fc5e22022-08-04 22:04:10 +01008 .setName("stats")
9 .setDescription("Gets the bot's stats");
pineafan4f164f32022-02-26 22:07:12 +000010
pineafanbd02b4a2022-08-05 22:01:38 +010011const callback = async (interaction: CommandInteraction): Promise<void> => {
pineafan377794f2022-04-18 19:01:01 +010012 interaction.reply({
pineafan4edb7762022-06-26 19:21:04 +010013 embeds: [new EmojiEmbed()
pineafan377794f2022-04-18 19:01:01 +010014 .setTitle("Stats")
15 .setDescription(
PineappleFanb3dd83c2022-06-17 10:53:48 +010016 `**Servers:** ${client.guilds.cache.size}\n` +
17 `**Ping:** \`${client.ws.ping*2}ms\``
pineafan377794f2022-04-18 19:01:01 +010018 )
19 .setStatus("Success")
20 .setEmoji("GUILD.GRAPHS")
21
22 ], ephemeral: true
23 });
pineafan63fc5e22022-08-04 22:04:10 +010024};
pineafan4f164f32022-02-26 22:07:12 +000025
pineafanbd02b4a2022-08-05 22:01:38 +010026const check = () => {
pineafan4f164f32022-02-26 22:07:12 +000027 return true;
pineafan63fc5e22022-08-04 22:04:10 +010028};
pineafan4f164f32022-02-26 22:07:12 +000029
30export { command };
31export { callback };
32export { check };