#how to detect an embed and then resend it

18 messages · Page 1 of 1 (latest)

nimble salmon
#

i want to do if the bot received the bot embed title call "wild pokémon has appeared!" then it will send message.

swift spearBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

grizzled pasture
hard ibex
grizzled pasture
#

:D

nimble salmon
hard ibex
#

Something like that yeah.
But remember. Like I said. The 0th index of the array could be null at some point.
It's good practice to check that before you check the title. But if you're certain that there will be an embed... then yes

#

My advice is to scope it to a channel

#

Rather than the whole messageCreate event

grizzled pasture
#

Or use optional chaining for that to prevent sudden errors (?.)

hard ibex
#

Oh yeah... that as well.. lmao forgot about that for a second there thanks

nimble salmon
#

it worked

grizzled pasture
#

You’re welcome

hard ibex