Deleting embeds by its content

Hi, is it possible for bots to read the content of an embed, and remove embedded message, when they have something in it? For example, i want to remove every embed, that have "[Wideo]" in it
No description
11 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 OP
πŸ€– RoboticRobot πŸ€–
does your bot send it?
KamilS
KamilSOPβ€’3mo ago
no ye, it have
d.js docs
d.js docsβ€’3mo ago
:property: Message#embeds @14.15.3 An array of embeds in the message - e.g. YouTube Player. This property requires the GatewayIntentBits.MessageContent privileged intent in a guild for messages that do not mention the client.
KamilS
KamilSOPβ€’3mo ago
probably delete yeah, will it use normal Event.MessageCreate to detect message with the embed or how it will look? because of i have no idea how the intents works
Youssef
Youssefβ€’3mo ago
Yes message create will Γ©mit every time someone send a message so just check the author, if it's the one you're looking for and do the rest of the code
KamilS
KamilSOPβ€’3mo ago
okay, could someone show me how to... idk. detect the text that is in embed?
Youssef
Youssefβ€’3mo ago
use this to get the embeds on the message
KamilS
KamilSOPβ€’3mo ago
i have the
client.on(Events.MessageCreate, async interaction => {
})
client.on(Events.MessageCreate, async interaction => {
})
and what should be in it, and sorry, because i have no idea how i should use that intent in my code
d.js docs
d.js docsβ€’3mo ago
:event: (event) Client#messageCreate @14.15.3 Emitted whenever a message is created.
KamilS
KamilSOPβ€’3mo ago
does it matter? okay, so i renamed it to just "message", and now for example i just want to console.log the message of embed sent, how do i do it? because if i do console.log(message) theres only info, that embed exists i mean i saw that, but i have no idea how to read that xD i mean idk if i should press something to go to any example how to use it or what okay, now i know, i think it's everything i want to know, thanks! :)
Want results from more Discord servers?
Add your server