Bot Not Seeing DMs

Hey all,

Working w/ DJS 14.8.0 and Node 18.12.0

I've seen a few threads related to this but I'm pretty sure their answers are already implemented in my code and my bot still isn't logging DMs. Anybody feel up to tackling a problem?

This is how I'm initializing my client (overkill, probably):
const client = new Client({
    disableEveryone: false, 
    intents: [
        GatewayIntentBits.Guilds, 
        GatewayIntentBits.GuildMessages, 
        GatewayIntentBits.MessageContent, 
        GatewayIntentBits.GuildMessageReactions, 
        GatewayIntentBits.DirectMessages, 
        GatewayIntentBits.DirectMessageReactions
    ], 
    partials: [
        Partials.Message, 
        Partials.Channel, 
        Partials.Reaction, 
        Partials.User
    ] 
})


and this is a snippet of my messageCreate handler:
client.on("messageCreate", async (message) => {
    // Check for DM
    if (message.channel.type === ChannelType.DM) {
        console.log("Got a DM")
        if (message.content.includes("help")) {
            console.log("Message includes help")
            message.reply(helptext)
        }
    }
})


Several other parts of the messageCreate handler work perfectly fine. It just seems to be the DM portion that doesn't

I have also tried message.channel.type === "dm" and similar, but no dice

The Message Content Intent Privileged Gateway Intent is enabled on Discord Developer Portal so that can't be it

ChatGPT is giving me outdated info so we're out of luck there too

Any thoughts? Thanks!
Was this page helpful?