Open Discord Bridge


Bridges Factorio chat and events to Discord. Captures vanilla events on its own and exposes the open-discord-bridge-v1 remote interface so other mods e.g. MTS (multi-team-support), or OARC can push their own events and receive inbound Discord messages.

Utilities
12 days ago
2.0
350

Changelog

Version: 0.1.12
Date: 2026-07-03
  Changes:
    - Rocket-launch announcements now scale in tiers as a force's launch total grows -- every launch
      up to 10, then one per 5 to 100, per 25 to 500, per 50 to 1000, and one per 100 after that --
      instead of a fixed 60-second cooldown. Each announcement lands on a round multiple (…45300,
      45400), so a megabase no longer floods the channel. The per-force tracker is seeded from the
      current launch total when the mod is added, so it doesn't re-announce the current total on
      first load.
Version: 0.1.11
Date: 2026-07-02
  Info:
    - AleForge now offers Open Discord Bridge as a first-class panel integration - the first
      hosting provider to do so. An illustrated end-user setup guide (Discord bot creation to
      verified two-way chat, no coding required) is at docs/aleforge/SETUP.md in the repo.
    - Community Discord server linked from the README and mod description.
    - Documentation-only release: the mod and bridge behave identically to 0.1.10.
Version: 0.1.10
Date: 2026-07-02
  Changes:
    - Security: Discord-to-game chat can no longer forge extra chat lines via newlines in the
      message or the sender's display name. Factorio rich-text tags ([color=], [img=], [item=])
      still render on purpose - after filtering, a Discord message can express exactly what an
      in-game chat line can.
    - Security: game-to-Discord relay no longer pings @everyone/@here/roles/users from message
      content. Intentional pings still work: linked-player @name mentions and the !link DM
      fallback use an explicit per-user allowlist.
    - Security: link restore after reconnect sanitizes RCON arguments, so a tampered links.json
      can no longer inject console commands.
    - Outgoing Discord messages are capped at 2000 chars with visible truncation instead of a
      silently dropped HTTP 400; long Discord-to-game messages are split across RCON calls
      instead of vanishing; an oversized/empty RCON command no longer tears down a healthy
      connection.
    - Companion mod: link codes generated int32-safely (fixes potential /odb-link crash),
      expired pending link codes are purged, only the server writes events.jsonl, server
      console chat is relayed to Discord as "Server", game_started fires on first player join
      (works on paused headless servers), vanilla.rocket_launched is rate-limited to one per
      force per 60s, and linked_discord_id no longer crashes when called before storage init.
    - Robustness: ${ENV}/~ expansion for links_file and SFTP paths, case-insensitive @mention
      resolution, rune-safe nickname truncation, links.json fsync before rename, Control API
      timeouts and request body limit, permission monitor retries after an initial error.
Version: 0.1.9
Date: 2026-07-02
  Changes:
    - Bridge writes bridge.effective.yaml at every startup, including failed ones: the fully
      resolved config it is running with, plus the config mode, validation result, secret
      SET/MISSING status (names only, never values), and warnings. Output only, never read back.
    - Unknown config keys now log a loud warning instead of being silently dropped (catches
      values injected at the wrong key path, e.g. by a hosting panel's config rewriter).
    - New ODB_CONFIG=none forces env-var mode even when a bridge.yaml exists, so a stray or
      panel-written file can never silently disable the ODB_* variables.
    - Env-var mode now ships a built-in command set by default: !players plus the full
      account-linking family (!link, !unlink, and admin-gated !links / !unlink-player /
      !unlink-all), correctly wired. Disable with ODB_DEFAULT_COMMANDS=false; an ODB_COMMANDS
      entry with the same trigger overrides the built-in one.
    - Reference Pterodactyl egg gains Config mode (ODB_CONFIG, default none) and Built-in
      commands (ODB_DEFAULT_COMMANDS) variables.
    - No gameplay changes - the companion mod is functionally identical to 0.1.5.
Version: 0.1.8
Date: 2026-06-29
  Changes:
    - Bridge can now write its logs to a file (in addition to stdout), so it's observable on
      hosts that background it and only surface files. Controlled by log_file / ODB_LOG_FILE;
      defaults to bridge.log next to the events file (local transport). Set log_file to "-"
      to log to stdout only.
    - No gameplay changes — the companion mod is functionally identical to 0.1.5.
Version: 0.1.7
Date: 2026-06-29
  Changes:
    - Bridge now auto-loads a .env file sitting next to its -config file (the setup wizard
      writes one there), so it starts without a separate "source the .env first" step. Real
      environment variables still take precedence, so hosting panels that inject their own
      variables are unaffected.
    - Setup wizard's invite URL now also requests Manage Channels, so the bot can keep the
      Discord channel topic in sync (on by default) without a manually-fixed invite link.
    - Docs: QUICKSTART.md now has self-contained "create & invite the bot" steps (token,
      Application ID, invite URL, channel ID) that don't require the wizard — for
      managed-host users who configure by hand.
    - No gameplay changes — the companion mod is functionally identical to 0.1.5.
Version: 0.1.6
Date: 2026-06-26
  Changes:
    - Docs: added QUICKSTART.md — a step-by-step setup guide for self-hosters who download
      the published binary (previous docs assumed a git clone, which confused binary users).
    - Release: bridge.yaml.example is now published as a release asset, so binary users get
      a documented, editable config template (previously only the binaries, egg, and mod
      zip were shipped).
    - Wizard: its closing "next steps" no longer reference clone-only scripts; it now points
      to running the binary directly and to QUICKSTART.md.
    - No gameplay changes — the companion mod is functionally identical to 0.1.5.
Version: 0.1.5
Date: 2026-06-05
  Changes:
    - odb.link_confirmed now includes discord_id field (required for bridge persistence).
    - odb.link_removed now includes discord_id field.
    - /odb-confirm-link now emits odb.link_confirmed (previously only the Discord-initiated
      flow emitted this event).
    - /odb-unlink-discord, /odb-unlink-player, and /odb-unlink-all now emit odb.link_removed
      for each removed link so the bridge can keep its persistent store in sync.
    - New /odb-set-link RCON command: silently restores a link into session storage without
      emitting an event. Called by the bridge on connection to repopulate links from its
      persistent links.json file after a Factorio reset.
Version: 0.1.4
Date: 2026-06-05
  Changes:
    - /odb-status RCON response now includes game.tick so the bridge can display
      actual map uptime in the channel topic instead of bridge connection time.
Version: 0.1.3
Date: 2026-06-03
  Features:
    - /odb-link now opens a GUI dialog with the Discord command pre-filled in a
      textfield for easy copy-paste, replacing the plain chat message.
    - Discord-initiated linking: typing !link in Discord with no code sends a
      private DM with /odb-discord-link <code> to run in Factorio. Falls back to
      an in-channel mention if DMs are disabled.
    - New /odb-discord-link <code> player command to complete Discord-initiated linking.
    - Link and unlink actions now post confirmation messages to Discord
      (odb.link_confirmed, odb.link_removed events).
    - /odb-status RCON response now includes connected players and active mods
      (used by the bridge for channel topic status).
Version: 0.1.2
Date: 2026-05-31
  Changes:
    - Discord→game chat now shows the Factorio username for linked players instead of their Discord display name.
Version: 0.1.1
Date: 2026-05-24
  Changes:
    - Added a mod thumbnail.
Version: 0.1.0
Date: 2026-05-23
  Features:
    - Initial release. Mirrors Factorio chat and events to Discord over RCON, and
      delivers Discord messages back into the game.
    - Companion Factorio mod captures vanilla events (chat, join/leave, deaths,
      rockets, research) and exposes the frozen open-discord-bridge-v1 remote
      interface so other mods (e.g. multi-team-support, OARC) can push their own
      events and receive inbound Discord messages.
    - Standalone Go bridge: configurable Discord->RCON commands (public and
      admin-only, single- and multi-line), slash commands, player linking
      (Discord <-> Factorio) with an optional synced role and nickname, and an
      optional HTTP control API.
    - Deploys as bare-metal, a container, or a Pterodactyl sidecar; events stream
      over a local file or SFTP, with RCON used for inbound delivery.