Don't DM a user with disabled DMs?

Is it possible for the bot to first check if a user has completely disabled DMs. And if so do not send a DM.
4 Replies
d.js toolkit
d.js toolkit16mo 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! - Marked as resolved by OP
Parogo_72
Parogo_7216mo ago
nope you need to send a message in order to know
progamersischu
progamersischu16mo ago
When u have the send Method as a Promise then u just simply .catch() the Error when u can't send someone a DM
whos there
whos thereOP16mo ago
I was just hoping the API had a method of seeing if a user had DMs enabled or not so as to avoid attempting to send a DM that would result in an error. Now I suppose the method I need to use is to maybe catch the error and if an error has been received when DMing a user .. maybe just don't DM that user for some period of time (Incase they enable DMs again)
Want results from more Discord servers?
Add your server