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

156
Views
Unhandled promise rejection: DiscordAPIError: Cannot send messages to this user
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

about "cannot send message to this user":

It could happen due to some reasons;

• The user doesn't share a server with the bot,

• The user has dms closed,

• The user has the bot blocked.

So you'll need to handle the error by putting .catch(console.error) or .catch((e) => {//Function here})

To fix it, replace the msg.author.send(embed) with the following:

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!