Skip to content

Discord0

A minimal, Hono-style router for Discord HTTP interactions that scales to zero on serverless hosts.
src/index.ts
import { Discord } from "discord0";
const app = new Discord();
app.command("ping", "Replies with Pong!", () => "Pong!");
app.component("approve:{id}", (c) => c.update(`Approved ${c.params.id}`));
export default app;

One app, six hosts

The same code runs on Cloudflare Workers, Vercel, Netlify, AWS Lambda, or a Node.js or Bun server. Pick a host with an adapter.

Slow handlers just work

A slow handler is deferred for you before Discord’s three-second deadline, and the adapter keeps the host alive until the reply is sent. Deferred work explains each host’s limits.

Local first

discord0 dev serves /interactions with hot reload and syncs your commands to a test server as you edit.

Ship with one command

discord0 deploy bundles your app, uploads it with the provider’s CLI, and registers your commands.