Discord Gateway Intents - UnionRolistes/Bot-Roles GitHub Wiki
Discord made a blog post about which can be found here
❯ Which intents are privileged, which do I need?
- GUILD_MEMBERS | guildMemberAdd, guildMemberRemove, guildMemberUpdate
- GUILD_PRESENCES | presenceUpdate, knowledge about peoples activities and client status
- If your bot does not need this information to provide its functionality, please do not request it.
❯ How can I do things without these events?
- Try to design your commands so they do not require this information
- Fetch member data by ID as you need it .members.fetch("id")
- You have GUILD_MEMBERS: consider fetching members periodically, for the initial operation on boot you can consider using the client option fetchAllMembers (note: this will heavily increase memory usage)
❯ A) Your bot is verified
- You need to reach out to discord support R3 in order for intents to be enabled
- Please include a use case sample as to why you need that intent into your request
- Read R1, it explains the whole procedure and requirements
❯ B) Your bot is not verified
- You can switch the intent toggles in the developer dashboard's "bot" section R2
- You should still consider designing your commands to not require privileged intents where ever possible
❯ Symptoms you might be experiencing right now:
- member caches are empty (or only have very few entries) (This is what happend at this bot)
- user cache is empty (or has only very few entries)
- fetching members times out
- all members appear to be offline
- login times out if you try to fetch all members on startup
- The client events "guildMemberAdd", "guildMemberRemove", "guildMemberUpdate" do not emit
- Guild#memberCount returns count as of ready
❯ Resources
- R1 Discords FAQ: https://dis.gd/gwupdate
- R2 Discord Developer Portal: https://discord.com/developers/applications
- R3 Discord Support: https://dis.gd/contact Source