Discord Privileged Intents — Official Use Case

How Astra Uses
Privileged Intents

Live interactive demonstrations of exactly how Astra utilizes each privileged intent — the same logic that runs in production.

Server MembersPresenceMessage Content
100+Servers
3Privileged Intents
LiveDemonstrations

Server Members Intent

GatewayIntentBits.GuildMembers

Astra subscribes to real-time member join/leave events to power welcome messages, auto-roles, raid detection, and accurate member count tracking.

Live Simulation
Astra Bot — #member-log
Online — 51,247 members
S

xsaitox

Playing Valorant

L

lunara_dev

Working on a project

N

nebula.star

Playing Minecraft

V

voidwalker

A

astro_pilot

Playing League of Legends

Live Event Log

Why Astra needs this:

→ Welcome messages with user info (name, avatar, account age)

→ Auto-role assignment on join

→ Member milestone announcements (1000th member!)

→ Member count channels (/membercount command)

→ Raid detection (mass joins in short time)

How Astra registers these intentssrc/bot/client.ts
import { Client, GatewayIntentBits, Partials } from "discord.js";

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMembers,     // Server Members Intent
    GatewayIntentBits.GuildPresences,   // Presence Intent
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent,   // Message Content Intent
    GatewayIntentBits.DirectMessages,
  ],
  partials: [Partials.Channel, Partials.Message, Partials.GuildMember],
});

// Example: Member join handler (requires GuildMembers intent)
client.on("guildMemberAdd", async (member) => {
  await sendWelcomeMessage(member);   // personalised welcome
  await assignAutoRoles(member);      // role assignment
  await checkRaidProtection(member);  // raid detection
  await updateMemberCountChannel();   // live counter
});

// Example: AutoMod (requires MessageContent intent)
client.on("messageCreate", async (message) => {
  if (await isSpam(message.content))     return deleteAndWarn(message);
  if (await isHateSpeech(message.content)) return deleteAndLog(message);
  if (await isPhishingLink(message.content)) return deleteAndBan(message);
  await awardXP(message);              // leveling system
});
Astra is live on 100+ Discord servers

Every intent shown above is actively used in production. Removing any of these would break core features that server administrators rely on daily.