docs(discord): document config.yaml-first mention settings - #89451
Open
szsunyuan wants to merge 1 commit into
Open
docs(discord): document config.yaml-first mention settings#89451szsunyuan wants to merge 1 commit into
szsunyuan wants to merge 1 commit into
Conversation
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
force-pushed
the
docs/discord-config-precedence
branch
from
August 21, 2026 03:15
3be68d9 to
4fc3302
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_mentionand_discord_free_response_channelsreadconfig.extrafirst and only fall back toDISCORD_*when the config key is unset. Fresh installs writediscord.require_mention: true, so a conflicting.envvalue is ignored.configuration.mdalready saysconfig.yamlwins 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:
.envis 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
Changes Made
website/docs/user-guide/messaging/discord.md: Configuration Reference + Config File sections now sayrequire_mention/free_response_channelsare config-firstuser-guide/messaging/discord.md: same two sentencesHow to Test
main, confirm the stale lines: “Environment variables always take precedence” and “the env var wins.”plugins/platforms/discord/adapter.py_discord_require_mention/_discord_free_response_channelsstill readconfig.extrafirst.website/docs/user-guide/configuration.mdstill listsconfig.yamlabove.envfor non-secrets.allow_mentionssnippet still says env vars win.Docs-only; Python tests are not required. CI Docs Site runs
lint:diagrams+build:fast.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass — N/A (docs-only; Python CI lane will not run)mainDocumentation & Housekeeping
docs/, docstrings)cli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AScreenshots / Logs
N/A — wording-only docs change.