WeBuildCrew
🎮 Discord Bots

Discord Bot Development Guide: Build, Deploy & Scale

Everything you need to know about building a Discord bot — from slash commands and role management to NFT verification, moderation and deploying at scale.

Zahid Ghotia9 min read
#Discord Bot Development#Custom Discord Bot#Bot Development#Community Automation#Node.js#Web3 Development
Discord Bot Development Guide: Build, Deploy & ScaleWeBuildCrew

Discord has become the central hub for crypto projects, gaming communities, SaaS products and creator audiences. A well-built bot turns a passive server into an interactive, self-moderating community that runs 24/7 without manual work. This guide walks through every layer — from your first slash command to verified NFT role gating at scale.

Why communities need a custom bot

Off-the-shelf bots like MEE6 cover basics but can't integrate with your own API, verify on-chain wallet holdings, sync with your CRM, or run custom game logic. Custom bots are the difference between a generic server and a platform.

The tech stack

discord.js

Bot framework

Node.js

Runtime

PostgreSQL

Member data

Redis

Rate limiting

Slash commands — the modern approach

Discord's slash command API is the standard for modern bots. Commands are registered globally or per-guild, auto-complete in the UI, and support subcommands, options and modals.

commands/verify.ts
TypeScript
import { SlashCommandBuilder } from "discord.js"; export const data = new SlashCommandBuilder()  .setName("verify")  .setDescription("Verify your NFT holdings to unlock roles"); export async function execute(interaction) {  const userId = interaction.user.id;  const link = await generateVerifyLink(userId);  await interaction.reply({ content: link, ephemeral: true });}
A slash command that triggers wallet verification.

Role gating & NFT verification

The most requested Discord bot feature in Web3: connect a wallet, check on-chain balances, and assign Discord roles automatically. We use a web-based verify flow that signs a message with the user's wallet, then our API confirms the holding and calls Discord's role API.

  • User runs /verify
  • Bot sends a unique link (ephemeral, expires in 10 min)
  • User signs with MetaMask or Phantom
  • API checks token balance on-chain
  • Bot assigns matching role(s) in real time

Auto-moderation at scale

Large communities face spam, raid attacks and scam links the moment they grow. A proper moderation system layers multiple signals: new account age, join velocity, message rate, known scam URLs and keyword filters.

events/messageCreate.ts
TypeScript
const SCAM_PATTERNS = [/free-nft./, /discord-nitro-gift./]; client.on("messageCreate", async (msg) => {  if (msg.author.bot) return;  if (SCAM_PATTERNS.some((p) => p.test(msg.content))) {    await msg.delete();    await msg.member?.timeout(10 * 60 * 1000, "Scam link");    await msg.channel.send(`⚠️ ${msg.author} was timed out.`);  }});
Scam link detection with immediate action.

Hosting & uptime

Discord bots need 24/7 uptime with auto-restart on crash. We deploy to a VPS or container (Railway, Fly.io, or a dedicated server) with PM2 or Docker for process management, and a health-check webhook that alerts if the bot goes offline.

Need this built? Explore our Telegram & Discord Bots service.

View service →

Written by Zahid Ghotia · Published 1 June 2026 · 9 min read

FAQ

Frequently asked questions

How long does a Discord bot take to build?

Simple moderation bots: 48 hours. Full NFT verification + engagement systems: 1–2 weeks.

Can a bot handle 100k members?

Yes — discord.js with Redis rate limiting and a proper event queue handles very large servers.

Do you host the bot after delivery?

We can include hosting in the package or hand off a Dockerised bot you can deploy anywhere.

Can the bot integrate with our website?

Absolutely — we wire Discord bots to your own API for CRM sync, ticket systems and custom dashboards.

Keep reading

Related articles

Need a Discord bot?

Verification, moderation, engagement and Web3 integrations — built and deployed fast.