Open fiffu opened 1 year ago
From the docs (https://discord.com/developers/docs/interactions/application-commands#registering-a-command):
Global commands have inherent read-repair functionality. That means that if you make an update to a global command, and a user tries to use that command before it has updated for them, Discord will do an internal version check and reject the command, and trigger a reload for that command.
Because commands have unique names within a type and scope, we treat POST requests for new commands as upserts. That means making a new command with an already-used name for your application will update the existing command.
So, redeployment updates commands, which means users' clients temporarily go out-of-sync until the internal reload is triggered either on the background, or through the "read-repair" mechanism.
Since read-repair is disruptive (end-to-end time goes up + user-facing error is flashed), the main benefit of adding app-side logic to avoid making POST calls is to reduce the incidence of read-repair.