Agency Logo
WeBuildCrew

Initializing...

Discord#discord#automation#bots

Discord Automation 2025: Moderation Bots, NFT Tools & Growth Hacks

Complete guide to Discord automation in 2025. From moderation to NFT verification to giveaway bots — everything a growing community needs.

ZZahid Ghotia Apr 25, 2025 10 min read
Share

Discord has tightened its API policies significantly in 2024-2025. User-account bots ('self-bots') are now aggressively detected and permanently banned. Everything in this guide uses the official Discord Bot API and discord.js v14 — the only safe, sustainable approach.

Five Bot Types Every Growing Server Needs

  • Moderation bot: auto-timeout, word filter, raid protection, audit logging
  • Welcome & onboarding bot: DM new members, verification CAPTCHA, role assignment
  • NFT/Token gating bot: verify wallet holdings, grant tier-based roles automatically
  • Giveaway bot: fair random selection, custom entry requirements, anti-bot protection
  • Analytics bot: daily member count, weekly growth charts, retention metrics

Building a Moderation Bot with discord.js v14

javascript
const { Client, GatewayIntentBits, Events } = require('discord.js');

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent,
    GatewayIntentBits.GuildMembers,
  ],
});

const BANNED_WORDS = ['spam', 'scam', 'phishing']; // extend as needed

client.on(Events.MessageCreate, async (message) => {
  if (message.author.bot) return;
  const lower = message.content.toLowerCase();

  if (BANNED_WORDS.some(word => lower.includes(word))) {
    await message.delete();
    await message.member.timeout(5 * 60 * 1000, 'Banned word detected');
    await message.channel.send(`⚠️ ${message.author} has been timed out.`);
  }
});

NFT Role Gating in 2025

Wallet-based role assignment is the most-requested Discord feature for crypto projects. Here's the production flow we use for clients.

  1. 1.User runs /verify in the bot channel
  2. 2.Bot generates a one-time link to your web verification page (expires in 10 minutes)
  3. 3.User connects wallet via RainbowKit or wagmi on the verification page
  4. 4.Backend checks NFT/token balance via Alchemy, QuickNode, or Moralis
  5. 5.Backend calls Discord REST API to assign role based on holdings tier
  6. 6.Role is re-validated on a 24-hour cron job — removed if holdings drop below threshold

Slash Commands vs. Legacy Prefix Commands

⚠️

Discord deprecated message-based prefix commands (e.g. !ban, !kick) in 2022. All new bots must use Slash Commands via the Interactions API. Any bot still using prefix commands is running outdated architecture and will eventually stop working when Discord removes the Message Content intent for large bots.

Anti-Raid Protection

  • Auto-lock server if join rate exceeds 20 new users per minute (raid detection)
  • Require phone verification for new members during active raid alerts
  • Use Discord's built-in AutoMod rules for mention spam and suspicious link patterns
  • Whitelist verified bots explicitly in your moderation rules to avoid false positives
  • Set new member message rate limits: max 5 messages per 10 seconds for accounts under 7 days old

Hosting for 24/7 Uptime

Discord bots require continuous uptime — polling disconnects cause missed events and frustrated users. For bots serving under 10K members, Railway with auto-restart policies works well. For larger servers, deploy on a Hetzner CX21 VPS with PM2 for process management and automatic restart on crash. Always implement graceful shutdown to avoid losing in-flight interactions.

Found this useful? Share it.

Tweet this
Z

Zahid Ghotia

CEO & Founder, WeBuildCrew

Full-stack engineer and automation specialist with 200+ projects delivered. Builds Telegram bots, Discord automation, and high-performance web products for clients worldwide.

Work with Zahid →

Get Weekly Growth Hacks

Telegram bot tutorials, Discord automation, Reddit auto-poster tips and crypto dev insights — every week.