Skip to content

Plugins

Maxime Gauthier edited this page Apr 30, 2026 · 1 revision

Plugins

OpenModBot uses optional plugins so deployments can choose the modules they need.

Enable plugins with comma-separated names:

PLUGINS=redis,admin_notifications

Built-In Plugins

  • openai: explicit OpenAI provider registration.
  • google_ai: Gemini-backed AI provider.
  • redis: Redis-backed core moderation storage.
  • postgres: Postgres-backed core moderation storage and shared Postgres capability.
  • harassment: passive harassment insight runtime and commands.
  • admin_notifications: Discord admin-channel notifications for moderation signals needing attention.
  • telemetry: OpenTelemetry setup.
  • personality: rewrite-tone selection for moderated watchlist messages.

Dependencies

  • harassment requires postgres.

Storage Plugins

Core moderation storage options:

  • no database plugin: in-memory watchlists, karma, and review queue
  • PLUGINS=redis: Redis-backed watchlists, karma, and review queue
  • PLUGINS=postgres: Postgres-backed watchlists, karma, and review queue

AI Providers

OpenAI is the default provider. Enable PLUGINS=google_ai and set GOOGLE_AI_API_KEY to use Gemini.

Provider Plugin Required key Model settings Default classifier model
OpenAI openai or default OPENAI_API_KEY OPENAI_MODERATION_MODEL, OPENAI_REWRITE_MODEL, HARASSMENT_CLASSIFIER_MODEL gpt-4o-2024-08-06
Google AI google_ai GOOGLE_AI_API_KEY GOOGLE_AI_MODEL, HARASSMENT_CLASSIFIER_MODEL GOOGLE_AI_MODEL

External AI backend plugins can provide the same provider methods: moderate_text, moderation_rewrite, generate_structured, query, and response_text.

Harassment

The harassment plugin passively captures interaction events, classifies harassment risk asynchronously, and exposes moderator insight commands without automated punishment.

Enable it with:

PLUGINS=postgres,harassment

The runtime uses Postgres-backed repositories for interaction events, classification records, classification jobs, classifier cache entries, per-server rate-limit buckets, and relationship-edge projections.

Admin Notifications

Enable it with:

PLUGINS=admin_notifications
ADMIN_NOTIFICATION_CHANNEL_ID=123456789012345678

The plugin sends privacy-safe notifications to the configured Discord channel when moderation category scores fall inside the ambiguous review band. It also notifies on automod outcomes. Raw message content is not included.

Rewrite Personalities

Enable it with:

PLUGINS=personality
PERSONALITY=objective

Available personalities are objective, empathetic, teacher, supportive, formal, concise, diplomatic, coach, plainspoken, legalistic, community_manager, southern_charm, shakespearean, robot, zen, pirate, and poetic.

External Plugins

External plugin packages can follow the OpenModBot::Plugin hook interface and register with OpenModBot::PluginRegistry.register.

Use PLUGIN_REQUIRES to load plugin packages before PLUGINS is resolved:

PLUGIN_REQUIRES=open_mod_bot/plugins/audit_webhook
PLUGINS=audit_webhook

Clone this wiki locally