Skip to content

dojoengine/daimyo

Repository files navigation

Daimyō 👹

A multi-faceted role management bot for the Dojo Discord.

Features

Community-driven reputation through :dojo: reactions. Progression: Kōhai → Senpai → Sensei based on peer recognition.

Wallet-linked roles based on Starknet state (NFT ownership, token holdings, etc.).

Automated Discord-to-Twitter content generation. Weekly scans identify developer stories and generate Twitter thread drafts with AI-generated images, sent to Typefully for review.

Deployment

The bot uses GitHub Actions for CI and Railway for deployment. Pushes to main automatically deploy after CI passes.

Setup

  1. Create Railway Project

    • Go to railway.app and sign in with GitHub
    • Click "New Project" → "Deploy from GitHub repo"
    • Select the daimyo repository
  2. Add PostgreSQL Database

    • In Railway, click "New" → "Database" → "Add PostgreSQL"
    • Railway will automatically set DATABASE_URL for your service
  3. Set Environment Variables

    • In Railway, go to your service → Variables
    • Add the following (see backend/.env.example for reference):
      # Core Discord config
      DISCORD_BOT_TOKEN=<your token>
      DISCORD_GUILD_ID=<your guild id>
      DISCORD_CLIENT_ID=<your client id>
      DOJO_EMOJI_NAME=dojo
      KOHAI_ROLE_ID=<role id>
      SENPAI_ROLE_ID=<role id>
      SENSEI_ROLE_ID=<role id>
      OHAYO_CHANNEL_ID=<channel id>
      
      # Reputation thresholds
      DECAY_WINDOW_DAYS=360
      SENPAI_REACTION_THRESHOLD=50
      SENPAI_UNIQUE_PERCENT=0.10
      SENSEI_REACTION_THRESHOLD=30
      SENSEI_UNIQUE_PERCENT=0.20
      
      # Content Pipeline (optional)
      CONTENT_CHANNEL_IDS=<comma-separated channel ids>
      OPENAI_API_KEY=<your openai key>
      TYPEFULLY_API_KEY=<your typefully key>
      
  4. (Optional) GitHub Branch Protection

    • Go to GitHub repo → Settings → Branches
    • Add rule for main branch
    • Enable "Require status checks to pass before merging"
    • Select the ci check

About

The Daimyo bot for the Dojo Discord

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published