pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 1 | import { CommandInteraction } from "discord.js"; |
| 2 | import { SlashCommandSubcommandBuilder } from "@discordjs/builders"; |
| 3 | import { WrappedCheck } from "jshaiku"; |
pineafan | 4edb776 | 2022-06-26 19:21:04 +0100 | [diff] [blame] | 4 | import EmojiEmbed from "../../utils/generateEmojiEmbed.js"; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 5 | import client from "../../utils/client.js"; |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 6 | |
| 7 | const command = (builder: SlashCommandSubcommandBuilder) => |
| 8 | builder |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 9 | .setName("stats") |
| 10 | .setDescription("Gets the bot's stats"); |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 11 | |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 12 | const callback = async (interaction: CommandInteraction): Promise<any> => { |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 13 | interaction.reply({ |
pineafan | 4edb776 | 2022-06-26 19:21:04 +0100 | [diff] [blame] | 14 | embeds: [new EmojiEmbed() |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 15 | .setTitle("Stats") |
| 16 | .setDescription( |
PineappleFan | b3dd83c | 2022-06-17 10:53:48 +0100 | [diff] [blame] | 17 | `**Servers:** ${client.guilds.cache.size}\n` + |
| 18 | `**Ping:** \`${client.ws.ping*2}ms\`` |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 19 | ) |
| 20 | .setStatus("Success") |
| 21 | .setEmoji("GUILD.GRAPHS") |
| 22 | |
| 23 | ], ephemeral: true |
| 24 | }); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 25 | }; |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 26 | |
| 27 | const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => { |
| 28 | return true; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 29 | }; |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 30 | |
| 31 | export { command }; |
| 32 | export { callback }; |
| 33 | export { check }; |