-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
Maxime Gauthier edited this page Apr 30, 2026
·
1 revision
OpenModBot runs as a Discord bot process. The default setup uses OpenAI and in-memory moderation state, which is enough for local testing and small trials.
- Ruby 3.3.11
- Bundler 2.4.5 or newer
- Discord bot token
- OpenAI API key, or Google AI API key when using the
google_aiplugin
From the bot directory:
gem install bundler -v 2.4.5
bundle installCopy .env.sample to .env and fill in the required secrets:
DISCORD_BOT_TOKEN=my_discord_secret
OPENAI_API_KEY=my_openai_secretRun the bot:
bundle exec ruby bot.rbRun the bot with Compose:
docker compose up --buildUse the Redis profile for Redis-backed core moderation state:
BUNDLE_WITH=redis PLUGINS=redis docker compose --profile redis up --buildUse the Postgres profile for harassment insights:
BUNDLE_WITH=postgres PLUGINS=postgres,harassment docker compose --profile postgres up --buildCompose starts a local postgres service, initializes the harassment schema from db/harassment/001_initial_schema.sql, and points the bot at postgres://postgres:postgres@postgres:5432/openmodbot unless DATABASE_URL is overridden.