discordjs / guide

The official guide for discord.js, created and maintained by core members of its community.
https://discordjs.guide
MIT License
1.57k stars 2.3k forks source link

Slash command: "The application did not respond" #1482

Closed thdoan closed 1 year ago

thdoan commented 1 year ago

Part of the guide or code sample the question is about

https://discordjs.guide/creating-your-bot/command-deployment.html

Question

I've successfully followed the guide and I can see the slash command autocomplete. However, when I press Enter I get the "The application did not respond" error. In the console I see [Flux] Dispatching MESSAGE_SEND_FAILED.

My command file looks like this:

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

module.exports = {
  data: new SlashCommandBuilder()
    .setName('ping')
    .setDescription('Test command'),
  async execute(interaction) {
    await interaction.reply('pong!');
  },
};

The bot has bot and applications.commands scopes.

megatank58 commented 1 year ago

Please post full errors and ask common questions/issues in the discord.js discord server.

thdoan commented 1 year ago

@megatank58 thanks, I'll do that. Do you have any advice on how to log more detailed error messages because all I see in Discord is "The application did not respond"?

Update: I figured it out -- had to keep the node . process running.