Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
Rechazo de promesa no manejado: DiscordAPIError: no se pueden enviar mensajes a este usuario
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);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!