blob: 98b87bea9de1dd9ee569722a16a89f725177b6c7 [file] [log] [blame]
pineafan4f164f32022-02-26 22:07:12 +00001import { CommandInteraction } from "discord.js";
2import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
3import { WrappedCheck } from "jshaiku";
pineafan4edb7762022-06-26 19:21:04 +01004import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
pineafan63fc5e22022-08-04 22:04:10 +01005import client from "../../utils/client.js";
pineafan4f164f32022-02-26 22:07:12 +00006
7const command = (builder: SlashCommandSubcommandBuilder) =>
8 builder
pineafan63fc5e22022-08-04 22:04:10 +01009 .setName("stats")
10 .setDescription("Gets the bot's stats");
pineafan4f164f32022-02-26 22:07:12 +000011
pineafan41d93562022-07-30 22:10:15 +010012const callback = async (interaction: CommandInteraction): Promise<any> => {
pineafan377794f2022-04-18 19:01:01 +010013 interaction.reply({
pineafan4edb7762022-06-26 19:21:04 +010014 embeds: [new EmojiEmbed()
pineafan377794f2022-04-18 19:01:01 +010015 .setTitle("Stats")
16 .setDescription(
PineappleFanb3dd83c2022-06-17 10:53:48 +010017 `**Servers:** ${client.guilds.cache.size}\n` +
18 `**Ping:** \`${client.ws.ping*2}ms\``
pineafan377794f2022-04-18 19:01:01 +010019 )
20 .setStatus("Success")
21 .setEmoji("GUILD.GRAPHS")
22
23 ], ephemeral: true
24 });
pineafan63fc5e22022-08-04 22:04:10 +010025};
pineafan4f164f32022-02-26 22:07:12 +000026
27const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
28 return true;
pineafan63fc5e22022-08-04 22:04:10 +010029};
pineafan4f164f32022-02-26 22:07:12 +000030
31export { command };
32export { callback };
33export { check };