Why does it say (node:3668) Warning: Supplying "ephemeral" for interaction response options is depre

(node:3668) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead. (Use node --trace-warnings ... to show where the warning was created) Code:
const suggestionHandler = new SuggestionHandler(interaction.client);
const { embeds, components } = await suggestionHandler.createSuggestionEmbed();

await (interaction.channel as TextChannel).send({ embeds, components });

await interaction.reply({
content: ":white_check_mark: Suggestion system has been set up in this channel!",
ephemeral: true
});
}
const suggestionHandler = new SuggestionHandler(interaction.client);
const { embeds, components } = await suggestionHandler.createSuggestionEmbed();

await (interaction.channel as TextChannel).send({ embeds, components });

await interaction.reply({
content: ":white_check_mark: Suggestion system has been set up in this channel!",
ephemeral: true
});
}
16 Replies
d.js toolkit
d.js toolkit•3mo 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 staff
NyR
NyR•3mo ago
Because it is deprecated.
d.js docs
d.js docs•3mo 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
Renssus
RenssusOP•3mo ago
when I run node dist/index.js It still gives the error? even tho there is non
No description
treble/luna
treble/luna•3mo ago
because its lowercase
Renssus
RenssusOP•3mo ago
does not matter
Renssus
RenssusOP•3mo ago
No description
NyR
NyR•3mo ago
Did you compile your updated code? Vscode search is most likely ignoring dist folder based on your .gitignore, so it may have your old code if you didn't compile
Renssus
RenssusOP•3mo ago
how can I do that sorry i always worked with npm run dev and then it worked an then I learned i need to do dist/index.js šŸ’€
NyR
NyR•3mo ago
dev one maybe running ts file "directly". You need to compile your code every time you make changes if you are using typescript
Renssus
RenssusOP•3mo ago
it runs: tsx watch src/index.ts šŸ’€
NyR
NyR•3mo ago
Exactly, ut runs ts files directly in the sense that it compiles it behind the scene. It is generally not recommended to be used in prod, so compiling and running the compiled .js file is what you should do. Also this all is beyond the scope of d.js, if you have further issues regarding this, please open a post in #other-js-ts
Renssus
RenssusOP•3mo ago
how to compile tho
NyR
NyR•3mo ago
You should know that already if you are using typescript. Did you not code it yourself?
Renssus
RenssusOP•3mo ago
i always used npm run dev not in producation
NyR
NyR•3mo ago
That's just running a script that you define. You would know if you coded that. Which I honestly doubt. Anyhow, you usually use tsc or there maybe another script defined if you got the code from somewhere (usually named build/compile, etc...)

Did you find this page helpful?