How to update the interaction message?

editReply returns me "Interaction has already been acknowledg"
await api.interactions.defer(interaction.id, interaction.token, {
  flags: MessageFlags.Ephemeral,
});
await wait.setTimeout(4000);
await api.interactions.editReply(
  interaction.id,
  interaction.token,
  {
    content: 'Hello World',
  },
);
Was this page helpful?