#TypeError this.embeds?.map is not a function

8 messages · Page 1 of 1 (latest)

surreal inletBOT
#

• 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.

#

Sending and editing now takes only a single object parameter!

- channel.send(embed);
+ channel.send({ embeds: [embed, embed2] });
- channel.send('Hello!', { embed });
+ channel.send({ content: 'Hello!', embeds: [embed, embed2] });

• Full migration guide: learn more

worldly grove
#

That’s only showing you how to send embeds correctly, not how to obtain a valid <Channel> object to call the send on. That is something you seem to have in your code already anyways else you wouldn’t get your error.

#

Show how you did it (as in show your code, the one your error stems from)

#

embeds needs to be an array, so [embed] (as was clearly shown in the tag above you said you did before)

viscid valve
#

that's not valid syntax

silk vector
#

because you send the @here above in the other message.channel.send but the second with the embed is wrong as they said so it errors normally and dont send it

viscid valve
#

you can also send the mention and the embed in the same message