import { LoadingEmbed } from "./../../utils/defaultEmbeds.js";
import { CommandInteraction } from "discord.js";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
import client from "../../utils/client.js";

const command = (builder: SlashCommandSubcommandBuilder) =>
    builder.setName("ping").setDescription("Gets the bot's ping time");

const callback = async (interaction: CommandInteraction): Promise<void> => {
    // WEBSOCKET | Nucleus -> Discord
    // EDITING   | Nucleus -> discord -> nucleus | edit time / 2
    const initial = new Date().getTime();
    await interaction.reply({ embeds: LoadingEmbed, ephemeral: true });
    const ping = new Date().getTime() - initial;
    interaction.editReply({
        embeds: [
            new EmojiEmbed()
                .setTitle("Ping")
                .setDescription(
                    `**Ping:** \`${ping}ms\`\n` +
                        `**To Discord:** \`${client.ws.ping}ms\`\n` +
                        `**From Expected:** \`±${Math.abs(ping / 2 - client.ws.ping)}ms\``
                )
                .setEmoji("CHANNEL.SLOWMODE.OFF")
                .setStatus("Danger")
        ]
    });
};

const check = () => {
    return true;
};

export { command };
export { callback };
export { check };
