#How to combine things into a embed.
11 messages · Page 1 of 1 (latest)
• 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.
@leaden valley Just combine them all into one embed. You can concatenate strings with +
I don't know how many a user will have
Loop
const error1 = new MessageEmbed()
.setTitle("Error!")
.setDescription("I was unable to purge the messages!" + fetched.array.forEach(element => {
element.content
}))
.setColor("RED")
.setFooter({text: "Kacaí", iconURL: 'https://cdn.discordapp.com/attachments/999345385451556924/1008516108405456997/0615184B-E5C3-4298-AAEE-BA4F79FE3838.png'})
fetched.array.forEach(element => {
element.content
});
Would that be good you think?
Well how tho, I am trying to log the messages the bot deleted by using
const fetched = await interaction.channel.messages.fetch({
limit: number
})
Array.prototype.map()
The map() method creates a new array populated with the results of calling a provided function on every element in the calling array.