i keep on getting the interaction failed error but i did the reply method already tried to debug it

const { Client, MessageEmbed, MessageActionRow, MessageButton,SlashCommandBuilder,Interaction } = require('discord.js');
const settings = require("./settings");

/**
*
* @param {Client} client
*/

module.exports = async(client) =>{
client.on("interactionCreate",async (interaction) =>{
if(interaction.isCommand() ) {
if(interaction.commandName =="ping") {
return interaction.reply({
content : "test f zebi",
});
}
}

});


};
const { Client, MessageEmbed, MessageActionRow, MessageButton,SlashCommandBuilder,Interaction } = require('discord.js');
const settings = require("./settings");

/**
*
* @param {Client} client
*/

module.exports = async(client) =>{
client.on("interactionCreate",async (interaction) =>{
if(interaction.isCommand() ) {
if(interaction.commandName =="ping") {
return interaction.reply({
content : "test f zebi",
});
}
}

});


};
7 Replies
d.js toolkit
d.js toolkit6mo 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!
treble/luna
treble/luna6mo ago
you arent using v14 it looks like and does that event fire at all (I also hope you dont register a listener for every command)
Frs
FrsOP6mo ago
i have the latest version already installed
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Frs
FrsOP6mo ago
in that case how exactly should do if u mind me asking
d.js docs
d.js docs6mo ago
If you aren't getting any errors, try to place console.log checkpoints throughout your code to find out where execution stops. - Once you do, log relevant values and if-conditions - More sophisticated debugging methods are breakpoints and runtime inspections: learn more
treble/luna
treble/luna6mo ago
Your imports are still mostly v13 so keep that in mind
Want results from more Discord servers?
Add your server