AFK Command buttons not working properly :(

here is my error code + my actual code is attched
DiscordAPIError[40060]: Interaction has already been acknowledged.
    at handleErrors (C:\Users\conno\Desktop\miasma_\node_modules\@discordjs\rest\dist\index.js:730:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async BurstHandler.runRequest (C:\Users\conno\Desktop\miasma_\node_modules\@discordjs\rest\dist\index.js:835:23)
    at async _REST.request (C:\Users\conno\Desktop\miasma_\node_modules\@discordjs\rest\dist\index.js:1278:22)
    at async ButtonInteraction.update (C:\Users\conno\Desktop\miasma_\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:236:5)
    at async InteractionCollector.<anonymous> (C:\Users\conno\Desktop\miasma_\index.js:297:13) {
  requestBody: {
    files: [],
    json: {
      type: 7,
      data: {
        content: 'You will receive DMs when mentioned.',
        tts: false,
        nonce: undefined,
        enforce_nonce: false,
        embeds: undefined,
        components: [],
        username: undefined,
        avatar_url: undefined,
        allowed_mentions: undefined,
        flags: undefined,
        message_reference: undefined,
        attachments: undefined,
        sticker_ids: undefined,
        thread_name: undefined,
        applied_tags: undefined,
        poll: undefined
      }
    }
  },
  rawError: {
    message: 'Interaction has already been acknowledged.',
    code: 40060
  },
  code: 40060,
  status: 400,
  method: 'POST',
  url: 'https://discord.com/api/v10/interactions/1264108625820123191/aW50ZXJhY3Rpb246MTI2NDEwODYyNTgyMDEyMzE5MTo4c0ZnMEFXOUl6aU4wQ1dSeDR3WlZpQjBjdmlXMkxCSlpNTDVEd3pXWjEwWWhERzJYYUdYakhlN3RSRkxKRlZZQmVCb3A5SXZwanZEYzE5bXMyRElhWXRKdmN3ZGp6UzU4Y3VWZGtMdldhSUl6bTFtdmtEWXFhU3NIMDhlelh1cg/callback'
}

Node.js v20.15.0
Was this page helpful?