#I need a helping hand from a professional Dev

12 messages · Page 1 of 1 (latest)

stark crater
#
Fehler beim Erkunden der Welt: DiscordAPIError[10062]: Unknown interaction
    at handleErrors (/home/discordbot/node_modules/@discordjs/rest/dist/index.js:727:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async BurstHandler.runRequest (/home/discordbot/node_modules/@discordjs/rest/dist/index.js:831:23)
    at async _REST.request (/home/discordbot/node_modules/@discordjs/rest/dist/index.js:1272:22)
    at async ChatInputCommandInteraction.reply (/home/discordbot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:115:5)
    at async Object.execute (/home/discordbot/commands/explore.js:27:4)
    at async Client.<anonymous> (/home/discordbot/index.js:74:3) {
  requestBody: { files: [], json: { type: 4, data: [Object] } },
  rawError: { message: 'Unknown interaction', code: 10062 },
  code: 10062,
  status: 404,
  method: 'POST',
  url: 'https://discord.com/api/v10/interactions/1315247716741152800/aW50ZXJhY3Rpb246MTMxNTI0NzcxNjc0MTE1MjgwMDppUHBHZmxzMmd5M003R2taVmwzbk5vbXJrd3ZMclFTeWpFbG5MRXN5Zm9zRHV5bXBrZk5sTkNlV2JNOFZNcW5PbTAzT2U1THdjRE45UHFVYTl3UGh0YkxRZEVnYmM4dkUzaEZHODhxQkE0ZmY0cWZsZGh1MDNxd2JFV0t0djAyYg/callback'
}
Fehler beim Ausführen der Interaktion: DiscordAPIError[40060]: Interaction has already been acknowledged.
    at handleErrors (/home/discordbot/node_modules/@discordjs/rest/dist/index.js:727:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async BurstHandler.runRequest (/home/discordbot/node_modules/@discordjs/rest/dist/index.js:831:23)
    at async _REST.request (/home/discordbot/node_modules/@discordjs/rest/dist/index.js:1272:22)
    at async ChatInputCommandInteraction.reply (/home/discordbot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:115:5)
    at async Object.execute (/home/discordbot/commands/explore.js:31:4)
    at async Client.<anonymous> (/home/discordbot/index.js:74:3) {
  requestBody: { files: [], json: { type: 4, data: [Object] } },
  rawError: {
    message: 'Interaction has already been acknowledged.',
    code: 40060
  },
  code: 40060,
  status: 400,
  method: 'POST',
  url: 'https://discord.com/api/v10/interactions/1315247716741152800/aW50ZXJhY3Rpb246MTMxNTI0NzcxNjc0MTE1MjgwMDppUHBHZmxzMmd5M003R2taVmwzbk5vbXJrd3ZMclFTeWpFbG5MRXN5Zm9zRHV5bXBrZk5sTkNlV2JNOFZNcW5PbTAzT2U1THdjRE45UHFVYTl3UGh0YkxRZEVnYmM4dkUzaEZHODhxQkE0ZmY0cWZsZGh1MDNxd2JFV0t0djAyYg/callback'
}

I don't have any Idea how I can solve this :3 ty for ur support

valid gulchBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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 staff
brave merlinBOT
#

Common causes of DiscordAPIError[10062]: Unknown interaction:

  • Initial response took more than 3 seconds ➞ defer the response *.
  • Wrong interaction object inside a collector.
  • Two processes handling the same command (the first consumes the interaction, so it won't be valid for the other instance)
    * Note: you cannot defer modal or autocomplete value responses
restive magnet
#

Sounds like the third bullet point applies here

stark crater
#

:0 hmmm ok ty

#

maybe my event+ the command itself do something wrong?

restive magnet
#

you're responding twice to the same interaction

#

Whether that be due to your event handler, duplicate events or duplicate instances

stark crater
#

hmmm ok ty ❤️ I think this is helpfull

stark crater
#

maybe this is the problem:
await command.execute(interaction);
and
await interaction.reply('Du hast folgende Gegenstände in der ${selectedWorldName} gefunden: ${foundItemsList}!');

restive magnet
#

thats just replying to the interaction

#

if you call that multiple times for the same interaction, that can cause problems yes