[英]"The reply to this interaction has not been sent or deferred." Is an error I keep getting on discord.js v13
So I've just completed writing a ping.js, echo.js, guildMemberAdd.js, and guildMemberRemove.js and I'm moving on to writing a ban.js and kick.js and currently all slash commands work except the latest commands which is kick and ban.所以我刚刚完成了 ping.js、echo.js、guildMemberAdd.js 和 guildMemberRemove.js 的编写,我正在继续编写 ban.js 和 kick.js,目前除了最新的命令外,所有斜杠命令都可以工作这是踢和禁止。 I keep getting the error that "The reply to this interaction has not been sent or deferred."
我不断收到“尚未发送或推迟对此交互的回复”的错误消息。 and I have no idea how to find a solution to it.
我不知道如何找到解决方案。 I originally had it written "return interaction.followUp" and I switched them all to "await interaction.followUp" hoping it'd be the solution the problem, but it seems like that wasn't it.
我最初将它写成“return interaction.followUp”,然后我将它们全部切换为“await interaction.followUp”,希望它能解决问题,但似乎不是这样。 I originally also had it written "run: async (interaction) => {" but then I get the error that "command.execute" is not a function so I switched it to "async execute (intereaction) {" I've also tried a couple of other things, but still can't seem to find a fix, does anyone have any idea on this?
我最初也写了“运行:异步(交互)=> {”但后来我得到“command.execute”不是函数的错误,所以我将它切换为“异步执行(交互){”我也尝试了其他几件事,但似乎仍然无法找到解决方法,有人对此有任何想法吗? I'll leave my interactionCreate.js and kick.js below
我将在下面留下我的 interactionCreate.js 和 kick.js
interactionCreate.js交互创建.js
module.exports = {
name: "interactionCreate",
async execute(interaction) {
if (!interaction.isCommand()) return;
const command = interaction.client.commands.get(interaction.commandName);
if (!command) return;
try {
await command.execute(interaction);
} catch (err) {
if (err) console.error(err);
await interaction.reply({
content: "An error occured while executing that command.",
ephemeral: true
});
}
}
}
您可以在回复交互之前尝试编辑回复
"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.