Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SpencerKaiser opened this issue Feb 13, 2025 · 1 comment

Comments

@SpencerKaiser
Copy link
Contributor

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

@Droid00000
Copy link

You specified GuildMessageReactions in your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants