Skip to content

Documentation does not specify GUILDS intent requirement when using DIRECT_MESSAGE_REACTIONS #7391

Open
@SpencerKaiser

Description

@SpencerKaiser

Description

Reading through the documentation associated with intents there is zero mention of the GUILDS intent being a requirement to use DIRECT_MESSAGE_REACTIONS

Steps to Reproduce

Create a tiny repro with these code. Without the GatewayIntentBits.Guilds intent, your handler will never fire

import { Client, Events, GatewayIntentBits, Partials } from "discord.js";
import { ENV } from "./env";

const { discordToken } = ENV;

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds, // WHY IS THIS NECESSARY?!?!?!
    GatewayIntentBits.GuildMessageReactions
  ],
  partials: [
    Partials.Reaction,
    Partials.Message,
    Partials.Channel,
    Partials.GuildMember,
    Partials.User,
  ],
});

client.once(Events.ClientReady, (readyClient) => {
  console.log(`Ready! Logged in as ${readyClient.user.tag}`);
});

client.on(Events.MessageReactionAdd, () => {
  console.log('Reaction added');
});

void client.login(discordToken);

Expected Behavior

Documentation would specify the reason the GUILDS intent is needed OR the intent would not be needed

Current Behavior

Intent is needed and nothing anywhere in the docs specifies why

Screenshots/Videos

No response

Client and System Information

macOS 14.2.1 (23C71)
discord.js 14.17.2
node v20.18.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions