Why cant i use MessageFlags.Ephemeral in v14.7.3?

Hello Everyone!! I am trying to use MessageFlags.Ephemeral as a flag in interaction.reply like this:
interaction.reply({ content: "Response!", flags: MessageFlags.Ephemeral });
interaction.reply({ content: "Response!", flags: MessageFlags.Ephemeral });
but everytime i then execute the slash command the bot crashes and node tells me that MessageFlags is not defined. Do i have to import something to use MessageFlags?
3 Replies
d.js toolkit
d.js toolkit3w 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
Amgelo
Amgelo3w ago
well you have to import MessageFlags
Cha0tic
Cha0ticOP3w ago
okay solved, weirdly enough nothing about that was mentioned wherever i searched and also didnt work before, maybe just a typo before Thank you!!

Did you find this page helpful?