How do I use a local image on a discord.js rich embed?

Updated Luke’s code to Discord.js v12 for anyone else in 2020 who has this same problem const attachment = new Discord .MessageAttachment(‘./card_images/sample.png’, ‘sample.png’); const embed = new Discord.MessageEmbed() .setTitle(‘Wicked Sweet Title’) .attachFiles(attachment) .setImage(‘attachment://sample.png’); message.channel.send({embed});

message event listener not working properly

In discord.js v13, it is necessary to specify an intent in new discord.Client(). Events other than the specified intent will not be received. ClientOptions Intents#FLAGS To receive the message event, you will need the GUILDS and GUILD_MESSAGES intents. You mean… const client = new Discord.Client({ partials: [‘MESSAGE’, ‘CHANNEL’, ‘REACTION’], intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES] }); Or to … Read more