Message Content problems
My bot can't access message content although the intents are enabled on the portal
42 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.discord.js version 14.3.0
node version 17.3.0
there is no error
i tried logging
message.content
in my messageCreate but it logged an empty line
so i suppose it cant access the contentUnknown User•3y ago
Message Not Public
Sign In & Join Server To View
ok so just now i lowered the djs version to 13.6.0 and everything works fine...
but for some reason it doesnt on the latest
i did
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
idk... it just is
so ig it really is a djs problem
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
hmu... so who do i approach
We highly recommend only specifying the intents you actually need.
• Note, that
98303
, 32767
or whatever other magic number you read represents "all intents", somewhere, gets outdated as soon as new intents are introduced.
• The number will always represent the same set of intents, excluding new ones, there is no magic "all intents" bit.Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
alright lemme try
also also
in the latest v
this is not working
use the ActivityType enum
whats that
an enum
with the activity types
import it from djs
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
OHH
lemme try
i do have access to message content but commands are not working now
but they were in v13.6.0
i changed all
MessageEmbeds
to EmbedBuilder
what about them isnt working
i only have a ping cmd... doesnt work
like i put a console.log("ok") after the command.execute(...) part but it doesnt log
and what if you place a log right below client.on('messageCreate'...
this works
logs the content
in your actual messageCreate event please
im pretty sure that event works cuz in the same file i have a regex which returns an embed when u mention the bot
and when i mention the bot it replies
well then your command handler sounds faulty
i can show my file if you want
WHY DOES IT WORK ON V13 JESUS
show your current client definition
and your actual message event
its pretty long so srbin ?
yup
srcbin*
ok
https://srcb.in/lsWy6TWtKw
very much doubt that works in v13
...
i made those changes a few minuites back...
sorry bout that... i made this handler myself so there are a few loopholes
kindly send the code that actually works in v13
cuz this doesnt
and it works so thanks a lot
k
aight cya