Discord Interaction, change a message from ephemeral to public

Viewed 1636

I have some interaction that returns an ephemeral message with components. From those components, I want to be able to reply with a non ephemeral message (replacing the ephemeral message). I know it used to be possible, because many times while I was coding my application, I forgot to set the options flag in some replies, and that made the message turns to visible for all. But now, when I try to reply with a message without specifying the flag, it doesn't change and still display the reply in a ephemeral message.

I have heard that Discord added a new parameter about ephemerality in the interaction format to have a proper support. I think my issue is linked to that, and even tho flags options still work, I must use that parameter for my needs. However, the documentation is not updated yet.

Is it still possible to do that, and is there somewhere I can find information about the said parameter?

1 Answers

You cannot change a reply from ephemeral to public. A suggestion I have would be to simply follow up with a new message. If you are trying to make it public to ephemeral, you can delete the original reply. You can't however do it the other way around, since the user has to manually delete it

interaction.reply({
  content: "ephemeral message",
  ephemeral: true
}
// you can use any event, but I am using setTimeout
setTimeout(() => {
  // interaction.deleteReply() --- only use if it starts out public
  interaction.followUp({
    content: "public message",
    ephemeral: false
  })
}, 3000)
Related