blob: cb10e7a524e45efce3e5c2c48c91097e382a3633 [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";
PineappleFanb3dd83c2022-06-17 10:53:48 +01005import client from "../../utils/client.js"
pineafan4f164f32022-02-26 22:07:12 +00006
7const command = (builder: SlashCommandSubcommandBuilder) =>
8 builder
9 .setName("stats")
pineafan377794f2022-04-18 19:01:01 +010010 .setDescription("Gets the bot's stats")
pineafan4f164f32022-02-26 22:07:12 +000011
12const callback = (interaction: CommandInteraction) => {
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 });
pineafan4f164f32022-02-26 22:07:12 +000025}
26
27const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
28 return true;
29}
30
31export { command };
32export { callback };
33export { check };