interaction.channel.send({
embeds: [generateEmbed(0)],
components: canFitInOnePage
? []
: [new ActionRowBuilder({components: [forwardButton]})]
}).then(embedMessage=>{
//do stuff
})
const current = guilds.slice(start, start + 10)
// You can of course customise this embed however you want
var embedd = new Discord.EmbedBuilder()
return await new EmbedBuilder({
title: `Showing results ${start}-${start + current.length} out of ${guilds.length} results for you`,
thumbnail: "https://i.imgur.com/gDRJiSZ.png",
author: {name: "EMC Shop Search"},
fields:
current.map(guild => ({
name: "ID[" + guild.ID + "] | " + dd["username"] + " - " + "/n spawn " + guild.nation,
value: "`" + guild.item + " - " + guild.itemcount + " for " + guild.price +" gold`" + " `"+ guild.other + "`" + " \nStocked : " + guild.stock + "\nBUYING: " + guild.buying
}))
})
}
It tells me " Cannot send empty message" error but the first embed is still sent ?
What's wrong?