help bot doesn't respond to messageCreate
so I have all intents turned on inside dev portal I dm it !ticket and the bot remains silent and the console remains empty any ideas why???
code:
17 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!To receive direct message events on
"messageCreate"
with your bot, you will need:
- The DirectMessages
gateway intent
- The Channel
partial settingwhat the hell is a partial
Click the link
I did although I've been using discord.js since v12 never heard of such thing and I got no idea how to use it š
do I like just put it once when defining the client?
Yes, and you should update some code. The guide shows everything
also
Ratelimits are dynamically assigned by the API based on current load and may change at any point.
- The scale from okay to API-spam is sliding and depends heavily on the action you are taking
- Rainbow roles, clock and counter channels, and DM'ing advertisements to all members are all examples of things that are not okay
who the fuck decided that receiving on message id's then fetching the full message manually was a good idea?
what purpose does this server like tf
The message will have the full data in
messageCreate
. The channel will have only the id.wait what?
I don't get the second part
DM channels aren't cached by default. And Discord doesn't provide it with the messageCreate event. So discord.js won't emit the event if the channel isn't cached, except you'll tell discord.js that you're ready to receive partial data by providing the Channel partial.
bro understanding calculus 3 was fucking easier -.-
fuck this im just changing my code
@Syjalo bruh so I did the partials thingy now it's returning that channel type is 1
š
rather than "dm"
well yeah
you have to use the ChannelType enum to compare
just like you did below to create the channel
I just noticed that it got changed and I just copied the channel create code