Refactoring, comments & overall improvements

This commit is contained in:
deytenit committed 2024-01-30 14:31:15 +03:00
1 parent d7421251ba
commit 3144dd69b7
60 files changed
+1106 -708

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "$lib/client.js";
import replies from "../lib/replies.js";
async function execute(client: Client, interaction: ChatInputCommandInteraction): Promise<void> {
if (!interaction.isChatInputCommand()) {
return;
}
const reply = await interaction.reply({ ...replies.ping(client.ws.ping), fetchReply: true });
await interaction.editReply(
replies.ping(client.ws.ping, reply.createdTimestamp - interaction.createdTimestamp)
);
}
const data = new SlashCommandBuilder().setName("ping").setDescription("Try to ping me.");
export { data, execute };