A multi-faceted role management bot for the Dojo Discord.
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.
The bot uses GitHub Actions for CI and Railway for deployment.
Pushes to main automatically deploy after CI passes.
-
Create Railway Project
- Go to railway.app and sign in with GitHub
- Click "New Project" → "Deploy from GitHub repo"
- Select the
daimyorepository
-
Add PostgreSQL Database
- In Railway, click "New" → "Database" → "Add PostgreSQL"
- Railway will automatically set
DATABASE_URLfor your service
-
Set Environment Variables
- In Railway, go to your service → Variables
- Add the following (see
backend/.env.examplefor 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>
-
(Optional) GitHub Branch Protection
- Go to GitHub repo → Settings → Branches
- Add rule for
mainbranch - Enable "Require status checks to pass before merging"
- Select the
cicheck