#but the bot still does not work tho it
1 messages ยท Page 1 of 1 (latest)
I see you
this is my index.js
You have clearly not declared the CHANNEL partial
and basically everything is working but the bot doesnt act on the code
oh i forgot
what is that and please explain what thjat means
no just add the partials section below intents
you need both
const myIntents = new Intents()
myIntents.add(Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_VOICE_STATES, Intents.FLAGS.GUILD_PRESENCES,Intents.FLAGS.GUILD_MESSAGE_REACTIONS, Intents.FLAGS.GUILD_MESSAGE_TYPING, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_INVITES, Intents.FLAGS.GUILD_INTEGRATIONS, Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS, Intents.FLAGS.GUILD_BANS, Intents.FLAGS.DIRECT_MESSAGE_TYPING, Intents.FLAGS.DIRECT_MESSAGE_REACTIONS, Intents.FLAGS.DIRECT_MESSAGES, Intents.FLAGS.GUILD_WEBHOOKS)
const client = new Client({ intents: myIntents, partials: ["CHANNEL", "GUILD_MEMBER", "MESSAGE", "REACTION", "USER"]})
thats how I have it
yikes
merge them
Bruh
put the partials in the main client
below the intents
using absolutely every intent isn't good btw
Functionality of my code: โ
Can u actually go through it without getting psychical damage: โ
Index.js = 5.5k lines code ๐
I wonder if a similar partials enum would be worth
why that?
fair
because you get unnecessary events from discord which slow down your bot
do you ever use webhooks intent or the integrations intent?
you only need the channel partial, but sure
pain
show your messageCreate code
have you saved/restarted to ensure the correct code is being run?
could you log something at the top of the messageCreate listener to see if the event is being fired?
yes i have saved it and rerun the bot
you are checking if message.channel.id is equal to that id, which is probably not for your dm
we are talking about this right ?
no
because the things on top of that are for somewthing else
then move the if statement out of the other one
also message.member.user is unnecessary, message.author works
thats what i meant when i said that everything on top is for a server, and i am adding dm script on the botom
yes
yes
oh that is not good
this is why tabbing is important
never used it, but I hear it's cool
i dont understand both of u but ok
but ... still no change
show code
i moved only 1
so move another 1 right ?
i have said hello
and it actually received it
good
but now we have a null error
alright
or so
For me "message.member.user.send("hey")" works
it can't in dms
message.member doesn't exists in dms
I know
also message.member.user is just a longer way to write message.author
true
but that's up to you
Yeah
thanks everybody !
I thought author is a bit bugged so I use this
Someone told me that
author is simply a getter to user
so whoever told you that probably didn't look at docs
author is simply same as the user
Bruh
Yeah I use message.author.bot
alright this is solved
thanks alot
Popular Topics: Enabling Partials