let embed = new Discord.MessageEmbed() .addField("DJ", `https://discord.gg/microsoft`) .addField("Unchecked`) .setColor("#363940") .setTimestamp(); msg.author.send(embed); let xd = new Discord.MessageEmbed() .setColor("#ff0000") .setTitle("CHECK YOUR DM") .setThumbnail("https://cdn.discordapp.com/attachments/773133136929226763/797204521997828106/777514274829893683.gif") .setFooter("DJ") .setTimestamp() .setDescription("I've sent you") msg.reply(xd).then(m => { setTimeout(() => { m.delete(); }, 900000); }); cooldown.add(msg.author.id); setTimeout(() => { cooldown.delete(msg.author.id); }, config.COOLDOWN * 60 * 1000);acerca de "no se puede enviar un mensaje a este usuario":
Podría suceder debido a algunas razones;
• El usuario no comparte un servidor con el bot,
• El usuario tiene dms cerrado,
• El usuario tiene bloqueado el bot.
Por lo tanto, deberá manejar el error poniendo .catch(console.error) o .catch((e) => {//Function here})
Para solucionarlo, reemplace msg.author.send(embed) con lo siguiente:
msg.author.send(embed).catch(console.error)