Discord Bot can only see itself and no other users in guild

  1. Enable the server members intent near the bottom of the Bot tab of your Discord Developer Portal:

    enter image description here

  2. Change the line client = discord.Client() to this:

    intents = discord.Intents.default()
    intents.members = True
    client = discord.Client(intents=intents)
    

    This makes your bot request the “members” gateway intent.


What are gateway intents? Intents allow you to subscribe to certain events. For example, if you set intents.typing = False your bot won’t be sent typing events which can save resources.

What are privileged intents? Privileged intents (like members and presences) are considered sensitive and require verification by Discord for bots in over 100 servers. For bots that are in less than 100 servers you just need to opt-in at the page shown above.

A Primer to Gateway Intents

Intents API Reference

Leave a Comment