Discord bot for the dotcurt Discord. Slash commands about the .curt format. Zero-process Cloudflare Worker.
/curt, /tools, /adopt, /faq — guild-scoped static responses, no
message-content intent, no external calls at invoke time.
A GatewayPresence Durable Object holds one outbound gateway WebSocket with
intents 0 — zero events, just the connection — so the bot shows Online in
the member list. WebSocket Hibernation parks the socket at Cloudflare's edge;
a 5-minute cron trigger (/ensure) is the self-healing backstop. Commands
never touch this path; without DISCORD_TOKEN the DO simply never connects
and commands keep working.
One-time setup after deploy: npx wrangler secret put DISCORD_TOKEN.
- Create the Discord app
.curtbotin the developer portal; bot user on. Copy the token, public key, and application ID. - OAuth-invite the app to the dotcurt guild with the
applications.commandsscope. - Set the repo secrets (GitHub):
CLOUDFLARE_API_TOKEN,CLOUDFLARE_ACCOUNT_ID. DISCORD_PUBLIC_KEYships as a plain var inwrangler.jsonc(the app's public key — publishable by design).DISCORD_TOKENis the one real Worker secret (presence only):npx wrangler secret put DISCORD_TOKEN.DISCORD_APPLICATION_IDandDISCORD_GUILD_IDare env vars fornpm run register(local, at registration time — never Worker secrets).- Register the slash commands (after the env vars exist locally):
npm run register
Push to main — .github/workflows/deploy.yml runs npx wrangler deploy
with CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID from repo secrets.
npm ci
npm test