blob: c12b950994d5034c5f45f16ff57df01ec3bb5260 [file] [log] [blame]
pineafan4f164f32022-02-26 22:07:12 +00001import { CommandInteraction } from "discord.js";
2import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
3import { WrappedCheck } from "jshaiku";
pineafan377794f2022-04-18 19:01:01 +01004import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
pineafan4f164f32022-02-26 22:07:12 +00005
6const command = (builder: SlashCommandSubcommandBuilder) =>
7 builder
8 .setName("stats")
pineafan377794f2022-04-18 19:01:01 +01009 .setDescription("Gets the bot's stats")
pineafan4f164f32022-02-26 22:07:12 +000010
11const callback = (interaction: CommandInteraction) => {
pineafan377794f2022-04-18 19:01:01 +010012 interaction.reply({
13 embeds: [new generateEmojiEmbed()
14 .setTitle("Stats")
15 .setDescription(
16 `**Servers:** ${interaction.client.guilds.cache.size}\n` +
17 `**Ping:** \`${interaction.client.ws.ping*2}ms\``
18 )
19 .setStatus("Success")
20 .setEmoji("GUILD.GRAPHS")
21
22 ], ephemeral: true
23 });
pineafan4f164f32022-02-26 22:07:12 +000024}
25
26const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
27 return true;
28}
29
30export { command };
31export { callback };
32export { check };