Discord notification bot for Toban workspaces, built with Cloudflare Workers and Hono.
- Discord: Slash commands and rich embed notifications. Available commands:
/workspace add <id>- Subscribe the current channel to workspace notifications/workspace list- List subscribed workspaces/workspace remove <id>- Unsubscribe the current channel from a workspace
- Real-time notifications for role transfers and thanks token transfers
- Discord slash commands for workspace subscription management
- ENS name resolution via NameStone API
- Hat metadata and images from Hats Protocol
- Hono - Web framework
- Cloudflare Workers - Runtime
- Cloudflare D1 - Database
- Drizzle ORM - ORM
- TypeScript
- Node.js 18+
- pnpm
- Install dependencies:
pnpm install- Create
.dev.varsfile:
cp .dev.vars.example .dev.vars- Run database migrations:
pnpm d1-migrate:local- Start the development server:
pnpm dev- If anything changes in
wrangler.jsoncor.dev.vars, regenerate types:
pnpm cf-typegen- If
src/db/schema.tschanges, regenerate Drizzle SQL:
pnpm drizzle-generate- Run database migrations for production:
pnpm d1-migrate:remote- Add secrets to Cloudflare:
pnpm cf-secret [file]- Deploy to Cloudflare:
pnpm deploy