How Astra Uses
Privileged Intents
Live interactive demonstrations of exactly how Astra utilizes each privileged intent — the same logic that runs in production.
Server Members Intent
GatewayIntentBits.GuildMembersAstra subscribes to real-time member join/leave events to power welcome messages, auto-roles, raid detection, and accurate member count tracking.
xsaitox
Playing Valorant
lunara_dev
Working on a project
nebula.star
Playing Minecraft
voidwalker
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)
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
});Every intent shown above is actively used in production. Removing any of these would break core features that server administrators rely on daily.