En primer lugar, lo siento por mi pobre inglés.
Empiezo a aprender js y quiero detectar la imagen en un mensaje de los usuarios del servidor y responder esto en un mensaje incrustado, el contenido del bot no funciona para eso.
if (msg.content.startsWith(`${prefi}tw`)) { // the command for te announcement const embed = new RichEmbed() .setColor("#3ded97") //message line color "Green" .setImage(msg.content()) //Image from the message .setFooter(`God • ${dia.toLocaleDateString()}`); //The base from the text with date and the sender msg.delete(); //Delete the message from the user msg.channel.send(embed); }Gracias amigos :'') H
Creo que podría obtener la imagen usando msg.attachments.url que devuelve la URL del archivo adjunto del mensaje (en este caso, una imagen)
Documento: https://discord.js.org/#/docs/discord.js/stable/class/MessageAttachment
Además, si está usando discord.js V13, para enviar incrustaciones creo que debería usar msg.channel.send({ embeds: [embed] }) en lugar de msg.channel.send(embed)
Editar : si está usando discord.js V12 o superior, use MessageEmbed() en lugar de RichEmbed()