Which intents does your bot need?
Tick what it does. You get the switches to turn on in the Developer Portal and the code to ask for them.
Your bot…
discord.py
discord.js
Intents number, for the raw gateway: 1
What intents are
When a bot connects, it tells Discord which kinds of events it wants: messages, members joining, reactions, voice. Those are its intents. Ask for too few and the bot silently never hears about something; ask for more than it uses and it does extra work for nothing.
The three privileged ones
Message Content, Server Members and Presence must also be switched on for your application in the Developer Portal, on the Bot page under Privileged Gateway Intents. If the code asks for one that is switched off there, the bot will not connect: discord.py stops with PrivilegedIntentsRequired, discord.js with Used disallowed intents. Once a bot is in 100 servers, Discord asks you to apply for each privileged intent it uses.
A bot that greets people needs Server Members; the welcome messages guide walks through it.
Message content, exactly
Without Message Content a bot still receives messages, with empty text, except direct messages, messages that mention the bot, and its own. A bot that only uses slash commands never needs it.
DMs and old messages
An intent alone is not always enough. discord.js only fires an event for things it already has in memory, and it never has a DM channel or a message from before the bot started. So a bot that reads DMs also needs partials: [Partials.Channel], and reaction roles need Partials.Message and Partials.Reaction for a message from before the bot started, and Partials.User for a reaction taken off by someone the bot has not seen since it started. Goodbyes need Partials.GuildMember for members it never had in memory. The code above adds them when you tick those boxes. In discord.py, on_reaction_add has the same blind spot, and on_raw_reaction_add does not. The reaction roles guide has a whole bot that uses them.