Message Content problems

My bot can't access message content although the intents are enabled on the portal
42 Replies
d.js docs
d.js docs2y ago
• 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.
mris
mris2y ago
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 content
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
mris
mris2y ago
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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
mris
mris2y ago
const client = new Client({ intents: 32767, partials: ["CHANNEL"] });
const client = new Client({ intents: 32767, partials: ["CHANNEL"] });
idk... it just is so ig it really is a djs problem
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
mris
mris2y ago
hmu... so who do i approach
d.js docs
d.js docs2y ago
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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
mris
mris2y ago
alright lemme try also also in the latest v
await client.user.setActivity("Visual Studio Code", {
type: "STREAMING",
url: "https://www.twitch.tv/kireina_ujaan",
});
await client.user.setActivity("Visual Studio Code", {
type: "STREAMING",
url: "https://www.twitch.tv/kireina_ujaan",
});
this is not working
chewie 🌈
chewie 🌈2y ago
use the ActivityType enum
mris
mris2y ago
whats that
chewie 🌈
chewie 🌈2y ago
an enum with the activity types import it from djs
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
mris
mris2y ago
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
chewie 🌈
chewie 🌈2y ago
what about them isnt working
mris
mris2y ago
i only have a ping cmd... doesnt work like i put a console.log("ok") after the command.execute(...) part but it doesnt log
chewie 🌈
chewie 🌈2y ago
and what if you place a log right below client.on('messageCreate'...
mris
mris2y ago
this works
mris
mris2y ago
mris
mris2y ago
logs the content
chewie 🌈
chewie 🌈2y ago
in your actual messageCreate event please
mris
mris2y ago
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
chewie 🌈
chewie 🌈2y ago
well then your command handler sounds faulty
mris
mris2y ago
i can show my file if you want
chewie 🌈
chewie 🌈2y ago
PalpatineDewItGif
mris
mris2y ago
mris
mris2y ago
WHY DOES IT WORK ON V13 JESUS
chewie 🌈
chewie 🌈2y ago
show your current client definition
mris
mris2y ago
const client = new Client({
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.MessageContent,
],
partials: ["CHANNEL"],
});
module.exports = client;
const client = new Client({
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.MessageContent,
],
partials: ["CHANNEL"],
});
module.exports = client;
chewie 🌈
chewie 🌈2y ago
and your actual message event
mris
mris2y ago
its pretty long so srbin ?
chewie 🌈
chewie 🌈2y ago
yup
mris
mris2y ago
chewie 🌈
chewie 🌈2y ago
chewie 🌈
chewie 🌈2y ago
very much doubt that works in v13
mris
mris2y ago
... i made those changes a few minuites back... sorry bout that... i made this handler myself so there are a few loopholes
chewie 🌈
chewie 🌈2y ago
kindly send the code that actually works in v13 cuz this doesnt
mris
mris2y ago
and it works so thanks a lot
chewie 🌈
chewie 🌈2y ago
k
mris
mris2y ago
aight cya