Discord Bot for Whitelist Management
Whitelist phase before public mint solves several tasks simultaneously: filters bots through activity verification, rewards early supporters, forms controlled demand. Discord bot is the standard tool for WL address collection, but its typical implementation creates a problem: one person with multiple Discord accounts gets multiple WL slots.
Where WL Bots Break
Sybil Problem and Solutions
Basic bot just records wallet address—no protection against multiple accounts from one person. Major collections receive hundreds of bot accounts with purchased history on Discord.
One wallet per Discord account — minimum level: if wallet is already registered to another Discord ID, reject it. Doesn't protect against owner with multiple Discord accounts.
Guild membership requirements — to register need N days in server, X messages, specific role. This raises attack cost: buying a boosted Discord account costs more than creating new one.
On-chain activity check — most reliable filter. Bot checks via Alchemy/Etherscan API: does wallet have transaction history, NFTs from specific collections (OG holder), POAPs, minimum balance. This is not only anti-Sybil but also target marketing — WL for real collectors, not flippers.
Ethereum Address Validation
Common mistake: bot accepts any string that looks like address without checksum verification. User enters lowercase address—it's valid Ethereum address. But when generating Merkle Tree for contract, normalization is needed: all addresses via ethers.utils.getAddress() or viem.getAddress() for EIP-55 checksum. Checksum mismatch in Merkle Tree means user can't mint even with correct address.
Check: ethers.isAddress(input) before saving + normalization via ethers.getAddress(input).
Bot Functionality
Wallet registration. /wallet 0x... — user enters address. Bot validates, checks duplicates (both directions: Discord ID → wallet and wallet → Discord ID), saves to database.
Roles and privileges. Separate roles for different WL categories: OG (priority mint, more slots), WL (standard), Public. Bot automatically assigns role after on-chain criteria check.
List management. Admin commands: /wl-export — CSV export, /wl-stats — count by category, /wl-remove @user — remove from list, /wl-check 0x... — address check.
Merkle Tree generation. On request or automatically before deployment — bot generates Merkle Tree from accumulated addresses and provides root for contract. Proof for each address — via API or in DM.
Technical Stack
discord.js v14 — main library. Slash commands instead of prefix commands (Discord modern standard). Interaction handling with ephemeral responses for private data commands.
Database — PostgreSQL (for production) or SQLite (for small collections). Storage: discord_id, wallet_address, registered_at, wl_tier, on_chain_checks_passed.
ethers.js v6 — address validation, Merkle Tree generation via merkletreejs + keccak256.
Deployment — Railway or VPS with PM2. For reliability — webhook-based deployment instead of long-polling.
Timeline Estimates
Basic bot (registration, deduplication, admin commands, export, Merkle generation) — 3-4 days. With on-chain activity checks and multi-tier WL roles — 5-7 days. Custom gamification mechanics (quests, referral system) — discussed separately.







