Commands dont get executed somehow

const { SlashCommandBuilder } = require('discord.js');

module.exports = {
    data: new SlashCommandBuilder()
        .setName('ping')
        .setDescription('Replies with Pong!')
        .addBooleanOption(option =>
            option.setName('hide')
                .setDescription('Wherever the respond is hidden or not')
                .setRequired(true)),
    async execute(interaction) {
        let hide = interaction.options.getBoolean('hide');
        await interaction.reply({content: `API Latency is ${Math.round(interaction.client.ws.ping)}ms`, ephemeral: hide});
    },
};
this is my /ping command. It gets registered but it doesn't get executed when i do /ping hide:true in my discord.
Was this page helpful?