Skip to content
dotcurtPublic

About

Discord bot for the dotcurt Discord — .curt format slash commands

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

.curtbot

Discord bot for the dotcurt Discord. Slash commands about the .curt format. Zero-process Cloudflare Worker.

Commands

/curt, /tools, /adopt, /faq — guild-scoped static responses, no message-content intent, no external calls at invoke time.

Presence (.curtBot shows Online)

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.

Setup (Jordan-only, Discord dev portal)

  1. Create the Discord app .curtbot in the developer portal; bot user on. Copy the token, public key, and application ID.
  2. OAuth-invite the app to the dotcurt guild with the applications.commands scope.
  3. Set the repo secrets (GitHub): CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID.
  4. DISCORD_PUBLIC_KEY ships as a plain var in wrangler.jsonc (the app's public key — publishable by design). DISCORD_TOKEN is the one real Worker secret (presence only): npx wrangler secret put DISCORD_TOKEN. DISCORD_APPLICATION_ID and DISCORD_GUILD_ID are env vars for npm run register (local, at registration time — never Worker secrets).
  5. Register the slash commands (after the env vars exist locally):
npm run register

Deploy

Push to main — .github/workflows/deploy.yml runs npx wrangler deploy with CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID from repo secrets.

Development

npm ci
npm test

About

Discord bot for the dotcurt Discord — .curt format slash commands

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages