private message
I have a strange issue occurring when trying to read messages in my Discord Bot DM. If I remove my Discord bot from my server and re-add it,I am able to start viewing the messages sent to the bot via dm.
If I disconnect my bot and restart it wont start receiving messages. If I remove the bot from a server and re-add it to a server it will start logging the private messages correctly. If I turn my server off and restart the bot will stop logging.
If I also remove it from a server the bot will stop logging. How do I resolve this and is this the expected behaviour?
Handler:
5 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 OPshow client constructor and relevant code please
Sorry about that!
you need the channel partial
To receive direct message events on
"messageCreate"
with your bot, you will need:
- The DirectMessages
gateway intent
- The Channel
partial setting