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 docs3y 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.
wen
wenOP3y 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 User3y ago
Message Not Public
Sign In & Join Server To View
wen
wenOP3y 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 User3y ago
Message Not Public
Sign In & Join Server To View
wen
wenOP3y 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 User3y ago
Message Not Public
Sign In & Join Server To View
wen
wenOP3y ago
hmu... so who do i approach
d.js docs
d.js docs3y 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 User3y ago
Message Not Public
Sign In & Join Server To View
wen
wenOP3y 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
chewie3y ago
use the ActivityType enum
wen
wenOP3y ago
whats that
chewie
chewie3y ago
an enum with the activity types import it from djs
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
wen
wenOP3y 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
chewie3y ago
what about them isnt working
wen
wenOP3y 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
chewie3y ago
and what if you place a log right below client.on('messageCreate'...
wen
wenOP3y ago
this works
wen
wenOP3y ago
wen
wenOP3y ago
logs the content
chewie
chewie3y ago
in your actual messageCreate event please
wen
wenOP3y 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
chewie3y ago
well then your command handler sounds faulty
wen
wenOP3y ago
i can show my file if you want
chewie
chewie3y ago
PalpatineDewItGif
wen
wenOP3y ago
wen
wenOP3y ago
WHY DOES IT WORK ON V13 JESUS
chewie
chewie3y ago
show your current client definition
wen
wenOP3y 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
chewie3y ago
and your actual message event
wen
wenOP3y ago
its pretty long so srbin ?
chewie
chewie3y ago
yup
wen
wenOP3y ago
chewie
chewie3y ago
chewie
chewie3y ago
very much doubt that works in v13
wen
wenOP3y ago
... i made those changes a few minuites back... sorry bout that... i made this handler myself so there are a few loopholes
chewie
chewie3y ago
kindly send the code that actually works in v13 cuz this doesnt
wen
wenOP3y ago
and it works so thanks a lot
chewie
chewie3y ago
k
wen
wenOP3y ago
aight cya
Want results from more Discord servers?
Add your server