Send a dm, when a user joins

Does anyone know how to check if a user has dms enabled before sending them a message. I want to send a welcome message when a new user joins a server. At some point it throws an error and my script crashes. Is there anyway to check the error?
2 Replies
d.js toolkit
d.js toolkit9mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
chewie
chewie9mo ago
all you can do is properly catch the error
Want results from more Discord servers?
Add your server