Interaction already been acknowledged

Code:
client.on("interactionCreate", async interaction => {
const split = interaction.customId.split("_");
const final = split[1];
if (interaction.customId === split[0]) {
const buttons = new MessageActionRow()
.addComponents(
new MessageButton()
.setLabel("Begrüßen")
.setStyle("PRIMARY")
.setCustomId(`customid`)
.setEmoji("👋")
);
await interaction.update({ components: [buttons] });

interaction.ack();
interaction.followUp(`**${interaction.user.username}** begrüßt **${final}**`)

}
})
client.on("interactionCreate", async interaction => {
const split = interaction.customId.split("_");
const final = split[1];
if (interaction.customId === split[0]) {
const buttons = new MessageActionRow()
.addComponents(
new MessageButton()
.setLabel("Begrüßen")
.setStyle("PRIMARY")
.setCustomId(`customid`)
.setEmoji("👋")
);
await interaction.update({ components: [buttons] });

interaction.ack();
interaction.followUp(`**${interaction.user.username}** begrüßt **${final}**`)

}
})
Error: Unhandled promise rejection: DiscordAPIError: Interaction has already been acknowledged. at RequestHandler.execute (C:\Users\freie\Desktop\Strandbots\nightbot\node_modules\discord.js\src\rest\RequestHandler.js:350:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async RequestHandler.push (C:\Users\freie\Desktop\Strandbots\nightbot\node_modules\discord.js\src\rest\RequestHandler.js:51:14) at async ButtonInteraction.update (C:\Users\freie\Desktop\Strandbots\nightbot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:218:5) at async Client.<anonymous> (C:\Users\freie\Desktop\Strandbots\nightbot\main.js:36:3) { method: 'post', path: '/interactions/1065263126636937216/aW50ZXJhY3Rpb246MTA2NTI2MzEyNjYzNjkzNzIxNjo0WFpEOVlNNTdhUFQ1SGNGUWRUM1VIR3Z5cnB5bFEwUFp0dkhvMWFhd0pLSDlRRWIwMmY0QmZXMWxnNVpmelBGU FNvWUVSMzFNNFZwM29TVUkzeXM1TGFFMVNFWWRTeVNZM0s0NDE0N0hpbDFHMG5rTmtZUEVUa3ZaWHg2NzZkRQ/callback', code: 40060, httpStatus: 400, requestData: { json: { type: 7, data: [Object] }, files: [] } }
2 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs2y ago
Documentation suggestion for @Bene:interface ThreadChannelTypes The types of channels that are threads. The available types are: (more...)
Want results from more Discord servers?
Add your server