-4

This is my code,

msg.author.send(helpembed)
  .catch(() =>{
    send(msg,":no_entry_sign: **Your DMs are closed! Open them so I can help you out!** :no_entry_sign:");
});
msg.react("✅");

and I was wondering if I could somehow do a code to say: If no catch (no errors) react with ✅. How could I do that?

Levi_OP
  • 945
  • 1
  • 9
  • 22
Jason
  • 19
  • 4

1 Answers1

1

This is what the .then(…, …) method does:

msg.author.send(helpembed).then(() => {
  msg.react("✅");
}, err => {
  send(msg,":no_entry_sign: **Your DMs are closed! Open them so I can help you out!** :no_entry_sign:");
});
Bergi
  • 630,263
  • 148
  • 957
  • 1,375