-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
  • 846
  • 1
  • 8
  • 19
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
  • 572,313
  • 128
  • 898
  • 1,281