Deploy Shugo
Context-aware Discord auto-moderation bot powered by Jev
bot
Just deployed
Deploy and Host Shugo on Railway
Shugo is a context-aware Discord auto-moderation bot powered by Jev, TypeSafe's System One model. It reads every message in your server, weighs it against the author's account age, how long they've been a member and their recent messages, then flags, deletes or times out rule breakers. Every action it takes is reported to a log channel.
About Hosting Shugo
Shugo is a single Go binary shipped as a small distroless Docker image. It keeps an outbound gateway connection to Discord and calls the Jev API over HTTPS. It has no web server, no public port and no database: recent messages are kept in memory for a few minutes. Hosting it means running one always-on container with two secrets, a Discord bot token and a TypeSafe API key. Run exactly one replica, because each replica keeps its own history and would moderate every message again. Start with DRY_RUN=true and a log channel, tune the thresholds on real traffic, then turn enforcement on.
Common Use Cases
- Stop spam bots and raids that join and post links within minutes
- Catch compromised accounts that suddenly blast scams across channels
- Remove harassment, hate and sexual content around the clock without a human on call
- Give a small moderation team a reviewable log of every borderline message
- Try AI moderation safely in dry-run mode before it touches anything
Dependencies for Shugo Hosting
- A Discord bot from the Discord Developer Portal, with the Message Content privileged intent enabled
- A TypeSafe API key for Jev, or an OpenRouter key through OpenRouter's Decisions API
Implementation Details
Invite the bot with the bot scope and these permissions:
- View Channels, Manage Messages and Moderate Members in every channel you want moderated
- Send Messages and Embed Links in the log channel
Then move Shugo's role above the roles of the members it should moderate. Discord rejects timeouts on members whose highest role is at or above the bot's. Members with Administrator or Manage Messages are never moderated.
A deterministic policy turns Jev's probabilities into actions. The first matching row wins:
| Condition | Action |
|---|---|
risk ≥ DELETE_RISK and (severity ≥ TIMEOUT_SEVERITY or suspicious author) | delete + timeout |
risk ≥ DELETE_RISK | delete |
risk ≥ FLAG_RISK and suspicious author | delete |
risk ≥ FLAG_RISK | flag (report only) |
Why Deploy Shugo on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Shugo on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
DISCORD_TOKEN
Bot token from the Discord Developer Portal (Bot → Reset Token). Enable the Message Content intent on the same page.
TYPESAFE_API_KEY
API key for Jev from TypeSafe. If you use OpenRouter, put your OpenRouter key here instead.
