Why channel.type is not working for me without any errors
31 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..type
returns a number not a string
use message.channel.isDMBased()
Tag suggestion for @pooyaneftekhari:
To receive direct message events on
"messageCreate"
with your bot, you will need:
• The DirectMessages
gateway intent
• The Channel
partial setting
This doesn't work as well
I mean follow the guide I sent
wdym
^
there all links
what are the numbers it returns
This doesn't work too!
will you read the guide or not?
It's filtered for me
I'm forbidden*
also
32767
isn't all intentsWe highly recommend only specifying the intents you actually need.
• Note, that
98303
, 32767
or whatever other magic number you read that represents "all intents", gets outdated as soon as new intents are introduced.
• The number will always represent the same set of intents, and will not include new ones. There is no magic "all intents" bit.weird
no
This returns error
look at what I sent
const { Partials } = require('discord.js');
why are you putting multiple objects?
This bot is for testing anything
that's why
that's how you set options
ohhh I'm dumb sorry
I'm using [email protected] is that ok?
didn't saw in you were on v13
edited ^
message.channel.type === "DM"
was fine tooThanks
so why it didn't work at first time?
Was is because I defined Client like that?
yep