blob: a67cd36c30b209db777e4432ca02a50d1da3bdf0 [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")
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")
16 .setEmoji("GUILD.GRAPHS")
17 ],
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 };