App didnt respond

async function handlePtMake(interaction) {
    try {
        const attachment = interaction.options.getAttachment('file');

        if (!attachment || !attachment.name.endsWith('.xlsx')) {
            await interaction.reply({ content: 'Please upload a valid Excel file.', ephemeral: true });
            return;
        }

        await interaction.deferReply({ ephemeral: true });

        // Fetch the attachment
        const response = await fetch(attachment.url);
        if (!response.ok) {
            throw new Error('Failed to download the Excel file.');
        }

        
Was this page helpful?