blob: beea94b05e6db95660070b057cb986ecc56da3a5 [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
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 });
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 };