how to i listen for dm messages
this doesnt seem to be getting called in dms
i have the intents dms and message content
8 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!
- ✅
Marked as resolved by OPnode verison is v20.19.0 and discordjs is @14.18.0
Do you also have the channel partial?
no
wdym
To receive direct message events on
"messageCreate"
with your bot, you will need:
- The DirectMessages
gateway intent
- The Channel
partial setting/home/jetbrains/Projects/DiscordBot/index.ts:20
Partials.Channel
^
ReferenceError: Partials is not defined
at sendEmbeds (/home/jetbrains/Projects/DiscordBot/index.ts:20:9)
at Object.<anonymous> (/home/jetbrains/Projects/DiscordBot/index.ts:54:2)
at Module._compile (node:internal/modules/cjs/loader:1529:14)
at Object.transformer (/home/jetbrains/.cache/JetBrains/RemoteDev/dist/693580c309f24_WebStorm-243.23654.44/plugins/nodeJS/js/ts-file-loader/node_modules/tsx/dist/register-DfubRCxM.cjs:2:823)
at Module.load (node:internal/modules/cjs/loader:1275:32)
at Module._load (node:internal/modules/cjs/loader:1096:12)
at cjsLoader (node:internal/modules/esm/translators:298:15)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:240:7)
at ModuleJob.run (node:internal/modules/esm/module_job:263:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:540:24)
Node.js v20.19.0
Did you import Partials?
oh thanks it works now