Steward runs the SkinsRestorer and SoulFire support bots in one Rust process. It provides static support commands, message logging, paste uploads, support thread replies, moderation checks, AI-assisted answers, and local image OCR.
Bot definitions live in src/bots. Each bot has a typed Rust
configuration for its identity, commands, responses, prompts, checks, and
support links.
- Rust 1.97.1 or newer
- On Linux, OpenSSL development headers and
pkg-configto build Steward (libssl-devandpkg-configon Debian and Ubuntu) - On Linux, the OpenSSL shared libraries and CA certificates to run Steward
- Discord applications with the Message Content and Server Members privileged intents enabled
- A token for each configured bot
- OpenRouter and Brave Search API keys for AI support replies
Set these environment variables in the shell, a local .env file, or the
deployment environment:
| Variable | Purpose |
|---|---|
DISCORD_TOKEN_STEWARD |
Discord token for Steward |
DISCORD_TOKEN_JARVIS |
Discord token for Jarvis |
OPENROUTER_API_KEY |
OpenRouter access for support answers |
BRAVE_SEARCH_API_KEY |
Current web context for support answers |
RUST_LOG |
Optional log filter, such as steward=debug,info |
Both Discord tokens and both AI keys are required at startup because the process initializes shared clients before starting either bot.
Both bots use deepseek/deepseek-v4-pro
through OpenRouter. To change the model, edit AiConfig.model in the matching
bot definition. Choose an OpenRouter model that supports tool calling for Brave Search.
When migrating from direct DeepSeek access, replace DEEPSEEK_API_KEY with
OPENROUTER_API_KEY and use an OpenRouter API key.
Both bots ban members who post in a text channel named exactly
interesting-chat. Spam scripts on compromised accounts often post in every
accessible channel. A honeypot catches these accounts without inspecting the
message content. See Honeypot's explanation
for more context.
-
Create a text channel named
interesting-chatin the server. -
Allow members to view the channel and send messages.
-
Disable public and private thread creation in the channel.
-
Add this warning to the channel topic and a pinned message:
Do not post here. This channel catches spam accounts. Posting here causes an immediate ban, even if you post by accident.
-
Give the bot the View Channel and Ban Members permissions.
-
Place the bot role above the member roles that it must ban.
Any member message triggers the ban, including replies and messages with only attachments. The ban removes the last 24 hours of that member's messages across the server. The bot records the channel and message IDs in the Discord audit log reason. It also logs successful bans and errors through tracing.
Bots, webhooks, the server owner, and configured staff roles are exempt. Members with Administrator, Manage Server, Ban Members, Kick Members, or Timeout Members permissions are also exempt. Discord prevents bans of members whose highest role is equal to or above the bot's highest role. See Discord's permission hierarchy and ban API.
Each bot definition contains a honeypot configuration. Change channel_names
to watch other exact names, or set it to &[] to disable the feature.
The name applies to every server where that bot runs. Renaming a channel
disables the trap unless its new name also matches.
Use exempt_role_ids to protect additional roles. Set delete_message_days
between 0 and 7 to change the cleanup period.
cargo run --releaseRelease mode matters for OCR performance. The detection and recognition models are embedded into the executable at build time, so no model download or runtime model directory is needed.
cargo fmt --all --check
cargo clippy --all-targets --all-features -- -D warnings
cargo deny --locked check # Requires cargo-deny 0.20.2
cargo test --all-targets
cargo build --release --lockedRailpack detects the root Cargo.toml as a Rust application, builds the
steward release binary, and starts it as ./bin/steward. The repository does
not need a Railpack configuration file, Dockerfile, or Compose file.
Configure the environment variables above in the deployment service and deploy
the repository root. Railpack supplies OpenSSL headers and pkg-config in its
build image. Its runtime image supplies the OpenSSL libraries and CA certificates.
Pushes to main build a release image with Railpack and publish it to
ghcr.io/skinsrestorer/steward. The workflow publishes three tags for both architectures:
latest: the latest published build frommainmain: the latest published build frommainsha-<12-character-commit-sha>: the build for a specific commit
The workflow builds amd64 on ubuntu-26.04 and arm64 on ubuntu-26.04-arm.
It authenticates to GHCR with GITHUB_TOKEN and packages: write permission.
Put the required environment variables in a local .env file. Then run:
docker run -d --name steward --restart unless-stopped \
--env-file .env ghcr.io/skinsrestorer/steward:latestThe image includes the OCR models. No model volume is required.
Edit the matching file in src/bots. Add a new definition to
src/bots/mod.rs when introducing another bot. Commands are
registered from these static definitions at startup.
The bundled OCR model provenance and license are documented in
models/README.md.
Read the contribution guide for development and review. Use the support guide for questions and issue routing.