How to send ephemeral messages in new updates?

I am back to discrod.js after quite a while, I used to send ephemeral messages by using the ephemeral: true in the interaction response like this:
await interaction.reply({
/*Message Conetent & Stuff*/
ephemeral: true
});
await interaction.reply({
/*Message Conetent & Stuff*/
ephemeral: true
});
The response works fine but I am not sure why am getting this warning now:
(node:73644) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead.
(node:73644) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead.
Specifications: - Type: module - Discord.js Version: 14.19.3 lmk if anything else is required.
2 Replies
d.js toolkit
d.js toolkit6mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
d.js docs
d.js docs6mo ago
The ephemeral option when replying to an interaction will be removed in v15
- {..., ephemeral: true}
+ {..., flags: MessageFlags.Ephemeral}
- {..., ephemeral: true}
+ {..., flags: MessageFlags.Ephemeral}
Read here on how to specify multiple flags

Did you find this page helpful?