Back to projects
Landi Bot
2026
In developmentA Discord moderation bot with no server to keep alive. It runs as a single Vercel function that answers Discord's slash commands, with per-guild settings in Neon Postgres.
Screenshots coming soon · in development
Overview
Landi Bot is a moderation and utility bot for my friend group's Discord server. There's no bot process sitting online 24/7. Discord just POSTs every slash command to one endpoint, the bot checks the signature, runs the command, and replies. Each server's settings live in Neon Postgres.
Problem
Pretty much every Discord bot assumes a permanent WebSocket connection, which means a VM, a process manager, and a monthly bill for something that's idle most of the day. I wanted the handful of moderation tools we actually use, deployed serverlessly, and I wanted the fiddly parts of Discord's interactions protocol handled properly instead of hacked around.
What I built
- A stateless interactions endpoint that verifies Discord's Ed25519 signature on the raw body before parsing anything, handles the PING handshake, and routes to the right command
- A deferred response pipeline for slow commands: Discord gives you 3 seconds, so the bot acks immediately and finishes the real work in the background, with a retry so a failure never leaves you staring at 'thinking...' forever
- Moderation commands (/kick, /ban, /timeout, /purge) with permission checks, durations you can actually type like 10m or 2h or 7d, and mod-log messages that never block the action itself if logging breaks
- /wordwatch, a word filter built on Discord's AutoMod API, which is the only way to catch keywords when you don't have a gateway connection
- Per-guild settings in Neon Postgres behind a lazy connection, so commands that don't touch the database still work even if the database config is wrong
- Utility commands (/ping, /userinfo, /serverinfo, /avatar, /roll) and a hand-written command registry, because Next.js traces imports statically and a globbed dynamic import would quietly leave commands out of the deployed bundle
- 164 Vitest tests covering the endpoint, dispatch, registry, commands, and helpers
Stack
Next.js 16 (App Router) on the Node runtime, TypeScript, discord-api-types and @discordjs/rest, discord-interactions for signature checks, Neon serverless Postgres, Zod, Vitest. Deployed on Vercel.
Outcome
A bot that costs nothing when nobody's using it and has no server to babysit. One function, one database, and a design that's upfront about what HTTP interactions can and can't do. Word watching is shipped, birthdays are designed and next up.