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
11 Replies
- 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 OPdoes your bot send it?
no
ye, it have
: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.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
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
okay, could someone show me how to... idk. detect the text that is in embed?
use this to get the embeds on the message
i have the
and what should be in it, and sorry, because i have no idea how i should use that intent in my code
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! :)