Skip to content

docs(discord): document config.yaml-first mention settings - #89451

Open
szsunyuan wants to merge 1 commit into
NousResearch:mainfrom
szsunyuan:docs/discord-config-precedence
Open

docs(discord): document config.yaml-first mention settings#89451
szsunyuan wants to merge 1 commit into
NousResearch:mainfrom
szsunyuan:docs/discord-config-precedence

Conversation

@szsunyuan

@szsunyuan szsunyuan commented Aug 18, 2026

Copy link
Copy Markdown

What does this PR do?

Fixes the Discord docs to match what the adapter actually does for the two keys in #13685.

On current main, _discord_require_mention and _discord_free_response_channels read config.extra first and only fall back to DISCORD_* when the config key is unset. Fresh installs write discord.require_mention: true, so a conflicting .env value is ignored. configuration.md already says config.yaml wins for non-secret settings. The Discord page still said the opposite.

The issue offered either a code change (env wins) or a docs change (config wins). This PR takes the docs side: .env is for secrets, and changing those helpers to env-first would fight that design. Closed PR #13732 was the code-side attempt; it is not revived here.

Open PR #82150 rewrites global precedence toward env-wins and softens one Discord sentence to a link. It does not implement #13685 and leaves the exact “the env var wins” sentence the issue quotes. This PR is scoped to those two mention-gating keys only.

The mention-control comment “env vars win over config.yaml” for DISCORD_ALLOW_MENTION_* is left alone — that path still bridges YAML only when the env var is unset.

Related Issue

Fixes #13685

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Security fix
  • Documentation update
  • Tests (adding or improving test coverage)
  • Refactor (no behavior change)
  • New skill (bundled or hub)

Changes Made

  • website/docs/user-guide/messaging/discord.md: Configuration Reference + Config File sections now say require_mention / free_response_channels are config-first
  • zh-Hans user-guide/messaging/discord.md: same two sentences

How to Test

  1. On main, confirm the stale lines: “Environment variables always take precedence” and “the env var wins.”
  2. Confirm plugins/platforms/discord/adapter.py _discord_require_mention / _discord_free_response_channels still read config.extra first.
  3. Confirm website/docs/user-guide/configuration.md still lists config.yaml above .env for non-secrets.
  4. Confirm the allow_mentions snippet still says env vars win.

Docs-only; Python tests are not required. CI Docs Site runs lint:diagrams + build:fast.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass — N/A (docs-only; Python CI lane will not run)
  • I've added tests for my changes — N/A (docs wording only)
  • I've tested on my platform: macOS (darwin 25.5) — wording/grep against current main

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings)
  • I've updated cli-config.yaml.example if I added/changed config keys — N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — N/A

Screenshots / Logs

N/A — wording-only docs change.

@alt-glitch alt-glitch added type/docs Documentation improvements platform/discord Discord bot adapter P3 Low — cosmetic, nice to have labels Aug 18, 2026
Adapter helpers read discord.require_mention and free_response_channels from config.yaml first. Align the Discord page (EN + zh-Hans) with that and with configuration.md, instead of claiming env always wins.
@szsunyuan
szsunyuan force-pushed the docs/discord-config-precedence branch from 3be68d9 to 4fc3302 Compare August 21, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have platform/discord Discord bot adapter type/docs Documentation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: config.yaml settings override .env settings, despite doc says the opposite

2 participants