Message content is empty, unless the bot is tagged
The message content field will always be blank, regardless, unless I mention the bot. Why's this?
27 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 OPMost likely because you don't have the message content intent enabled.
I tried enabling all intents by doing this
but i guess i shouldn't do this..?
You definitely should not paste a magic number there.
You should only enable what you need (guilds as minimum, since discord.js needs that if you interact with guilds)
Bot status
System info
API Latency
Library
Called by furretpaws
im also making user app commands
so
should i just use
the normal intents
instead of a magic number
Yeah
alr give me a sec
so i guess this should be fine?
okay yeah it's working
awesome
👍
i have another question tho, is there a way so the bot detects dms without having to actually open a dm to the user first
messages aren't going through
Yes, I think you need to enable the channel partial for that.
channel partial?
do i have to put it somewhere here or
Yeah, it's another option, like
intents
is: https://discordjs.guide/popular-topics/partials.html#handling-partial-data
I don't recall if we had something written for receivin dms :jynEHEH:Interesting
why's this btw
on other libraries that i've seen it just detects the message right away
huh
nothing's coming up
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
To receive direct message events on
"messageCreate"
with your bot, you will need:
- The DirectMessages
gateway intent
- The Channel
partial settingThere it went
Ohhh
okay now it works
thanks :33