Prevent link embeds while sending a message

How can I prevent link embeds while sending a message? I'd like to avoid <url> if possible since I'm working with user-controlled input. https://github.com/discordjs/discord.js/issues/7818 seems to suggest it's technically possible to surpress at send time rather than doing a followup suppressEmbeds call
4 Replies
d.js toolkit
d.js toolkitβ€’8mo 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
πŸŒΊπŸ‡«πŸ‡· Shigu :3 🌺
This seems to be possible by adding the SuppressEmbeds flag to the message payload (so you have to define the message payload, add the flag explicitely before sending it).
d.js docs
d.js docsβ€’8mo ago
method BitField#add() Adds bits to these dtypes v10: MessageFlags - SuppressEmbeds read more
jr
jrβ€’8mo ago
Thank you so much, will test Works perfectly, thanks!