"The application did not respond"

I tried looking around and saw a lot of other people had this problem, but couldn't find any accurate solutions. Running Discord.js version 14.18.0 and node 22.13.1. No matter the command, Discord simply responds with "The application did not respond". Its like it didn't even reach the async function. deploy-commands.js
require('dotenv').config();
const { REST, Routes } = require('discord.js');
const fs = require('fs');
const path = require('path');

const TOKEN = process.env.TOKEN;
const CLIENT_ID = 'XXXXXXXXX';
const GUILD_IDS = [
"XXXXXXXXXXXXX",
"XXXXXXXXXXXXX"
];

const commands = [];
const commandFiles = fs.readdirSync(path.join(__dirname, 'commands')).filter(file => file.endsWith('.js'));

for (const file of commandFiles) {
const command = require(`./commands/${file}`);
commands.push(command.data);
}

const rest = new REST({ version: '10' }).setToken(TOKEN);


(async () => {
try {
console.log('Refreshing application (/) commands...');

await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands });

for (const guildId of GUILD_IDS) {
await rest.put(Routes.applicationGuildCommands(CLIENT_ID, guildId), { body: commands });
console.log(`✅ Slash commands updated for Guild ID: ${guildId}`);
}

console.log('✅ All slash commands updated!');
} catch (error) {
console.error(error);
}
})();
require('dotenv').config();
const { REST, Routes } = require('discord.js');
const fs = require('fs');
const path = require('path');

const TOKEN = process.env.TOKEN;
const CLIENT_ID = 'XXXXXXXXX';
const GUILD_IDS = [
"XXXXXXXXXXXXX",
"XXXXXXXXXXXXX"
];

const commands = [];
const commandFiles = fs.readdirSync(path.join(__dirname, 'commands')).filter(file => file.endsWith('.js'));

for (const file of commandFiles) {
const command = require(`./commands/${file}`);
commands.push(command.data);
}

const rest = new REST({ version: '10' }).setToken(TOKEN);


(async () => {
try {
console.log('Refreshing application (/) commands...');

await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands });

for (const guildId of GUILD_IDS) {
await rest.put(Routes.applicationGuildCommands(CLIENT_ID, guildId), { body: commands });
console.log(`✅ Slash commands updated for Guild ID: ${guildId}`);
}

console.log('✅ All slash commands updated!');
} catch (error) {
console.error(error);
}
})();
ping.js
const { SlashCommandBuilder } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Ping!')
.setContexts('0'),

async execute(interaction) {
try {
interaction.reply({ content: `Pong!`, flags: 64 });
} catch (error) {
console.error(error);
interaction.reply({ content: 'I can\'t pong!', flags: 64 });
}
}
};
const { SlashCommandBuilder } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Ping!')
.setContexts('0'),

async execute(interaction) {
try {
interaction.reply({ content: `Pong!`, flags: 64 });
} catch (error) {
console.error(error);
interaction.reply({ content: 'I can\'t pong!', flags: 64 });
}
}
};
No errors in console either.
1 Reply
d.js toolkit
d.js toolkit3mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP

Did you find this page helpful?