Skip to content

Instantly share code, notes, and snippets.

Last active May 27, 2024 19:53
Show Gist options
  • Save advaith1/e69bcc1cdd6d0087322734451f15aa2f to your computer and use it in GitHub Desktop.
Save advaith1/e69bcc1cdd6d0087322734451f15aa2f to your computer and use it in GitHub Desktop.
Discord Gateway Intents Explainer

Intents Explainer

If you're wondering what Gateway Intents are, what Privileged Intents are, why your bot can't see statuses, or why your bot can't see member joins anymore, then this page should explain it to you!

if you do not know what intents are, please read this entire page


First, a short explanation of how bots work: bots can make requests over the REST (HTTP) API to retreive information and do actions, and they get real-time updates from Discord in the form of websocket gateway events. They can also fetch server members via the gateway.

Examples of gateway events you are probably familiar with are Message Create (a message was sent) and Guild Member Add (a user joined a server).

What are Gateway Intents?

Gateway Intents are groups of events. Bots can choose which intents to receive events from. You can see the docs and full list of intents here.

Need help with setting intents in your code? These links should help: discord.js,, JDA

Privileged Intents

Discord has made 3 intents privileged intents: GUILD_MEMBERS (Server Members), GUILD_PRESENCES (Presence), and Message Content. These intents are now disabled by default in Gateway v6.

What are these privileged intents needed for?

Guild Members (Server Members Intent) is used for:

  • Doing something when someone joins a server (Guild Member Add event)
  • Doing something when a member/user's data is updated (Guild Member Update event)
  • Doing something when someone leaves a server (Guild Member Remove event)
  • Getting the entire list of members in a server (Request/List Guild Members)

It is not needed for:

  • Seeing data of the author of a message (that is included in the message data)
  • Getting a specific member/user by ID
  • Getting a guild member by their name
  • Getting a guild's member count (that can be retreived with the Get Guild endpoint)

Guild Presences (Presence Intent) is used for getting member presences, which includes:

  • "Playing"/"Streaming"/"Watching"/"Competing" activities
  • Custom Status
  • User status: online, idle, dnd, or offline

The intent is needed to fetch this data as well as get the Presence Update event when it changes; all users other than the bot will appear offline with no activities if you do not have this intent.

It is not needed for setting the bot's status/presence.

The presence intent is also required for the initial guild member list (which includes all members for small guilds and online members + members without roles for larger guilds), but note that your bot will not be whitelisted for the presence intent if you just need it for member caching. You should be fetching members/users when needed instead of relying on your bot's member/user cache.

The Message Content intent is used for reading the content, embeds, attachments, and components of a message. It is not needed for sending messages, it only affects reading. You should be using Slash Commands instead of using messages for commands; you will not get the intent if your sue case for it can be replaced with Interactions. For more information, read the FAQ and Policy.

The Message Content intent went into effect on September 1, 2022.

Common Privileged Intent Misconceptions

  • You do not need, and will not get, privileged intents to get a "user count" for your bot. If intents affects your "user count", then you are probably showing the amount of cached users. Instead, if you really want a "user count", add up the member counts of all servers; for help doing this in your library, go to its support server.

  • You do not need privileged intents to get a server's member count or online member count. Instead, you should fetch the guild and and use the approximate_member_count and approximate_presence_count properties. ( did not support this until v2.)

Getting Privileged Intents

You cannot just specify privileged intents in your list and get them, you must enable or be whitelisted for them:

for bots in less than 76 servers:

  • Go to the Developer Portal, select your bot, and click the Bot tab
  • Turn on the switches for the intents you need
Click to show screenshot

for bigger bots:

You should request the privileged intents your bot requires in the bot verification form when applying for verification.

Note: You will not be approved for privileged intents for userinfo/serverinfo commands.

If your bot is verified but you did not do that and you need the intent now, go to your application's Bot tab in the Developer Portal and request them.

Default Behavior

On Gateway v8 and v9, sending intents is required to connect. On v6, bots now get events from all intents they qualify for. This includes all non-privileged intents as well as all intents you have enabled (for bots in <100 servers) or all events you are whitelisted for (for bigger bots).

discord.js v14 uses Gateway v10, v13 uses Gateway v9, and older versions use gateway v6. v2 uses Gateway v10. Some versions of v1 use Gateway v6 but send an intents value of all non-privileged intents by default, so if you want privileged intents you have to specify intents in your code.

Verified bots: Don't know if you are whitelisted? Click to see an image showing the states of the intent switches for verified bots.
Copy link


Copy link


Copy link

ndzn commented Apr 27, 2021


Copy link

good stuff

Copy link

wnm210 commented May 31, 2021

good job

Copy link


Copy link

This helped me a lot with my discord bot. I just filled the verification form. Hope it will get verified soon.

Copy link

JDJGInc commented Jul 30, 2021 has no tutorials on a direct api request

Copy link

thank you this will be very helpful

Copy link

Wtf does the intent 1 << 1 mean? How would I put that in my code.. (not using a library)

Copy link

Wtf does the intent 1 << 1 mean? How would I put that in my code.. (not using a library)

Copy link

@DanDev95 it computes to a number; to use multiple intents, use the | operator:

intents: 1 << 0 | 1 << 1 | 1 << 2

that computes to intents: 7

you can use to see the result number (and events) of having certain intents

to learn about the operators:

Copy link

Thank you so much! This was extremely helpful.

Copy link

This helped me a lot with my discord bot. I just filled the verification form. Hope it will get verified soon.

Did u git verified?

Copy link

JDJGInc commented Dec 8, 2021

Fun fact I actually added approrixmate_member_count and approximate_prescence_count to some forks myself.
So 🀷 Yeah it exists.

Copy link

zLevii commented Dec 23, 2021

This is a really helpful documentation

Copy link

oq-x commented Feb 16, 2022


Copy link

JDJGInc commented Mar 6, 2022

with_counts has been added to dpy :)
Please update the gist thank you.

Copy link

Abaios commented Apr 5, 2022


Copy link


advaith is the documentation

Copy link

JDJGInc commented Aug 18, 2022

" seems to not currently support this, so if you use you should do a direct API request. discord.js supports this.)"
(also it's on a release one)

Copy link


Copy link

Hi if my request was denied what should I do?

Copy link

hello people I like people

Copy link

Left Shift operator explained:

a << b is the syntax.
Left Shift's explanation is a * 2 ** b.
So, for example:

const a = 5;
const b = 2;

// 5 * (2 ** 2)
console.log(a << b); // prints 20

That's it

Copy link





Copy link


Copy link

Thanks man....

Copy link

Hi, That's really make sense

Somebody knows if I can request later the privilege, when it will be required?

Thanks, @advaith1

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