TripSit / TripBot

The discord bot on TripSit.Me
22 stars 12 forks source link

DiscordAPIError[40060]: Interaction has already been acknowledged. #771

Open LunaUrsa opened 4 months ago

LunaUrsa commented 4 months ago

View details in Rollbar: https://app.rollbar.com/a/tripsit/fix/item/TripBot/71

DiscordAPIError[40060]: Interaction has already been acknowledged.
    at handleErrors (/usr/src/app/node_modules/@discordjs/rest/src/lib/handlers/Shared.ts:148:10)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at BurstHandler.runRequest (/usr/src/app/node_modules/@discordjs/rest/src/lib/handlers/BurstHandler.ts:143:20)
    at _REST.request (/usr/src/app/node_modules/@discordjs/rest/src/lib/REST.ts:211:20)
    at ButtonInteraction.update (/usr/src/app/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:233:5)
    at acknowledgeButton (/usr/src/app/src/discord/commands/guild/d.moderate.ts:1264:3)
    at buttonClick (/usr/src/app/src/discord/events/buttonClick.ts:80:5)
LunaUrsa commented 4 months ago

When someone is warned/timed out, and they click the agree/reject button, it will sometimes respond with this error

On the Tripsit side, we will sometimes get double "this person has acknowledged/rejected their warning" messages, so something is causing this function to run twice?