Discord Bot Verification System: CAPTCHA, Reaction Roles, and Anti-Raid

Published on

Build a Discord verification system with CAPTCHA challenges, reaction role gates, and anti-raid protection to keep your server safe.

Written by Space-Node Team – Infrastructure Team – 15+ years combined experience in game server hosting, VPS infrastructure, and 24/7 streaming solutions. Read author bio →

Verification systems are essential for any public Discord server. Without one, bots and raiders flood your server within days. Here is how to build effective verification using your own bot.

Why Verification Matters

Public Discord servers face three main threats:

  • Spam bots - Automated accounts that join and immediately send phishing links or advertisements
  • Raid bots - Coordinated account floods that mass-ping, spam, or crash your server
  • Alt accounts - Banned users rejoining on new accounts to evade moderation

A proper verification gate stops the majority of these before they can interact with your community.

Verification Methods

Reaction-Based Verification

The simplest approach: post a rules message and require users to react with a specific emoji to gain access.

// Listen for reactions on the verification message
client.on('messageReactionAdd', async (reaction, user) => {
  if (reaction.message.id !== VERIFY_MESSAGE_ID) return;
  if (user.bot) return;
  
  const member = await reaction.message.guild.members.fetch(user.id);
  await member.roles.add(VERIFIED_ROLE_ID);
});

Pros: Easy to implement, low barrier for real users. Cons: Simple bots can automate reactions too.

CAPTCHA Verification

Send new members a DM with a code challenge:

  1. User joins → bot sends a DM with a simple math problem or scrambled word
  2. User replies with the answer
  3. Correct answer → verified role granted
  4. Wrong answers or timeout → kicked or kept unverified

This blocks most automated bots since they can't solve visual or logical challenges.

Account Age Filtering

Check account creation date and add delays for new accounts:

client.on('guildMemberAdd', async member => {
  const accountAge = Date.now() - member.user.createdTimestamp;
  const sevenDays = 7 * 24 * 60 * 60 * 1000;
  
  if (accountAge < sevenDays) {
    // Flag as suspicious, require extra verification
    await member.roles.add(QUARANTINE_ROLE_ID);
  }
});

Anti-Raid Detection

Beyond individual verification, monitor for raid patterns:

  • Join rate monitoring - If 10+ accounts join within 60 seconds, trigger lockdown
  • Message pattern detection - Flag identical messages sent by multiple new accounts
  • Automatic lockdown - Temporarily restrict server permissions when a raid is detected
const joinTimestamps = [];

client.on('guildMemberAdd', async member => {
  const now = Date.now();
  joinTimestamps.push(now);
  
  // Clean old timestamps (older than 60 seconds)
  while (joinTimestamps.length > 0 && joinTimestamps[0] < now - 60000) {
    joinTimestamps.shift();
  }
  
  if (joinTimestamps.length >= 10) {
    // Trigger raid mode - lock server
    await enableRaidMode(member.guild);
  }
});

Server Setup

Structure your Discord server with verification in mind:

  1. #rules channel - visible to everyone, read-only
  2. #verify channel - where unverified members interact with the bot
  3. Verified role - grants access to all normal channels
  4. @everyone - should have minimal permissions by default

Best Practices

  • Combine methods - reaction verify + account age check is stronger than either alone
  • Log all verification attempts for moderation review
  • Set a timeout - kick unverified members after 24-48 hours
  • Make the process clear - confused new members leave permanently
  • Test your system regularly - join on an alt to verify the experience

A solid verification system drastically reduces moderation workload and keeps your community safe. The time investment in building one pays off quickly.

Space-Node Team

About the Author

Space-Node Team – Infrastructure Team – Experts in game server hosting, VPS infrastructure, and 24/7 streaming solutions with 15+ years combined experience.

Since 2023
500+ servers hosted
4.8/5 avg rating

Our team specializes in Minecraft, FiveM, Rust, and 24/7 streaming infrastructure, operating enterprise-grade AMD Ryzen 9 hardware in Netherlands datacenters. We maintain GDPR compliance and ISO 27001-aligned security standards.

View Space-Node's full team bio and credentials →

Launch Your VPS Today

Get started with professional VPS hosting powered by enterprise hardware. Instant deployment and 24/7 support included.

Discord Bot Verification System: CAPTCHA, Reaction Roles, and Anti-Raid