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
- 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 OPnope
you need to send a message in order to know
When u have the send Method as a Promise then u just simply .catch() the Error when u can't send someone a DM
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)