Skip to content

aowheel/toban-bot

Repository files navigation

Toban Bot

Discord notification bot for Toban workspaces, built with Cloudflare Workers and Hono.

Supported Platforms

  • 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

Features

  • 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

Tech Stack

Prerequisites

  • Node.js 18+
  • pnpm

Setup

  1. Install dependencies:
pnpm install
  1. Create .dev.vars file:
cp .dev.vars.example .dev.vars

Development

  1. Run database migrations:
pnpm d1-migrate:local
  1. Start the development server:
pnpm dev
  1. If anything changes in wrangler.jsonc or .dev.vars, regenerate types:
pnpm cf-typegen
  1. If src/db/schema.ts changes, regenerate Drizzle SQL:
pnpm drizzle-generate

Deployment

  1. Run database migrations for production:
pnpm d1-migrate:remote
  1. Add secrets to Cloudflare:
pnpm cf-secret [file]
  1. Deploy to Cloudflare:
pnpm deploy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors