RoaldDahl / Button-Handler

4 stars 1 forks source link

Small error `Interaction has already been acknowledged` #1

Closed SENPAY98K closed 2 years ago

SENPAY98K commented 2 years ago

It works fine image

but still drops an error

DiscordAPIError[40060]: Interaction has already been acknowledged.
    at SequentialHandler.runRequest (C:\Users\Administrator\Desktop\DJS14\node_modules\@discordjs\rest\dist\index.js:748:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async SequentialHandler.queueRequest (C:\Users\Administrator\Desktop\DJS14\node_modules\@discordjs\rest\dist\index.js:560:14)
    at async REST.request (C:\Users\Administrator\Desktop\DJS14\node_modules\@discordjs\rest\dist\index.js:1000:22)
    at async ButtonInteraction.reply (C:\Users\Administrator\Desktop\DJS14\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:110:5) {
  rawError: {
    message: 'Interaction has already been acknowledged.',
    code: 40060
  },
  code: 40060,
  status: 400,
  method: 'POST',
  url: 'https://discord.com/api/v10/interactions/1015448602040082522/aW50ZXJhY3Rpb246MTAxNTQ0ODYwMjA0MDA4MjUyMjo1eHAyT3JUZzJQajZ0VjdIVUFCd0w1Umw4RHVia3BIVmREcFYydmhHcmdleTVvVWpFYnc3TVFNdEpNR1FsWWxwWkFtZ1JuMjJwTHFFc1E2UkFtbzl0ekViUE1NbFJkTG9XQmR3NVNUd1kzUlBsSFB6TDlrZmczY0R6ZmpMSldDNQ/callback',
  requestBody: { files: [], json: { type: 4, data: [Object] } }
}
RoaldDahl commented 2 years ago

I'd say you done something wrong as it seems to work fine for everyone else, I've also just tested it myself

SENPAY98K commented 2 years ago

Here's the files image

image

image

RoaldDahl commented 2 years ago

whats your index.js look like

SENPAY98K commented 2 years ago

image

SENPAY98K commented 2 years ago

I only edited the ascii tables

RoaldDahl commented 2 years ago

I'm confused as to why it's doing that to you then, works for everyone else

SENPAY98K commented 2 years ago

I will try again and see

RoaldDahl commented 2 years ago

only thing i can think of is you have two instances of your bot running

SENPAY98K commented 2 years ago

i was using for test, and i created new server with it only

image