Why does it just say "application didn't respond"?

const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const Utils = require('../../utils');

module.exports = {
    data: new SlashCommandBuilder()
        .setName('ban')
        .setDescription('Ban a player from the server')
        .addUserOption(option =>
            option.setName('user')
                .setDescription('The user to ban')
                .setRequired(true))
        .addStringOption(option =>
            option.setName('time')
                .setDescription('The time to ban the user for'))
        .addStringOption(option =>
            option.setName('reason')
                .setDescription('The reason to ban the user for')),
    async execute(interaction) {
        const user = interaction.options.getUser('user');
        const time = interaction.options.getUser('time');
        const reason = interaction.options.getUser('reason');

        const channel = await client.channels.fetch("1198299044582281216", { force: true });
        const embed = new EmbedBuilder()
        embed.setTitle("test")
        await interaction.reply({ embeds: [embed] })
    },
};
client.on(Events.InteractionCreate, async interaction => {
    if (!interaction.isChatInputCommand()) return;
    const command = interaction.client.commands.get(interaction.commandName);

    if (!command) {
        console.error(`No command matching ${interaction.commandName} was found.`);
        return;
    }

    try {
        await command.execute(interaction);
    } catch (error) {
        console.error(error);
        if (interaction.replied || interaction.deferred) {
            await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
        } else {
            await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
        }
    }
});
and it just says No command matching ban was found. in the console.
Was this page helpful?