hermes - ✅(Solved) Fix feat(discord): support guild-level free-response mode [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#19955Fetched 2026-05-05 06:04:11
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #19956: feat(discord): support guild-level free-response mode

Description (problem / solution / changelog)

Summary

  • Add discord.free_response_guilds so selected Discord guilds can bypass @mention gating while other guilds still require mentions.
  • Wire the new setting through config/env loading as DISCORD_FREE_RESPONSE_GUILDS.
  • Add tests for guild-level allow behavior, other-guild mention gating, scalar YAML coercion, and env blocklist coverage.

Motivation

This lets users run Hermes as a resident assistant in a private/low-noise guild without disabling mention requirements globally or maintaining every channel ID in discord.free_response_channels.

Closes #19955

Test Plan

  • python -m pytest tests/gateway/test_discord_free_response.py tests/tools/test_local_env_blocklist.py -q -o 'addopts='
  • python -m py_compile gateway/config.py gateway/platforms/discord.py

Note: a targeted python -m ruff check ... surfaces pre-existing E402/F401 issues in gateway/platforms/discord.py and tests/conftest.py unrelated to this change.

Changed files

  • gateway/config.py (modified, +7/-0)
  • gateway/platforms/discord.py (modified, +44/-2)
  • tests/conftest.py (modified, +1/-0)
  • tests/gateway/test_discord_free_response.py (modified, +60/-5)
  • tests/tools/test_local_env_blocklist.py (modified, +1/-0)
  • tools/environments/local.py (modified, +1/-0)

Code Example

discord:
  require_mention: true
  free_response_guilds:
    - "1476256146980606197"
RAW_BUFFERClick to expand / collapse

Feature Description

Discord currently supports mention-gating globally (discord.require_mention) and channel-level free-response exemptions (discord.free_response_channels). It would be useful to also support guild-level free-response exemptions, so a bot can respond to every message in specific low-noise/private guilds while still requiring @mentions in all other guilds.

Motivation

Some users run Hermes in multiple Discord guilds:

  • Personal/private guilds where Hermes is the only or primary participant and should behave like a resident assistant.
  • Shared/team/community guilds where Hermes should stay quiet unless explicitly @mentioned.

Today, users must either:

  1. Disable discord.require_mention globally, which is too noisy/risky across all guilds.
  2. Maintain every channel ID in discord.free_response_channels, which is brittle when channels/threads are added.

Proposed Solution

Add a new Discord config key:

discord:
  require_mention: true
  free_response_guilds:
    - "1476256146980606197"

Behavior:

  • If discord.require_mention is true and the incoming message's guild ID is listed in discord.free_response_guilds, skip the @mention requirement.
  • Other guilds keep the existing mention-gated behavior.
  • Existing discord.free_response_channels, DMs, thread participation, ignored channels, and allowed channels behavior remains unchanged.

Alternatives Considered

  • Use discord.free_response_channels for every channel in a guild. This works but requires ongoing manual maintenance and misses new channels.
  • Set discord.require_mention: false globally. This is too broad when the bot is installed in multiple guilds.

extent analysis

TL;DR

To support guild-level free-response exemptions, add a new Discord config key discord.free_response_guilds with the desired guild IDs.

Guidance

  • Introduce a new configuration option discord.free_response_guilds to specify guilds where the bot should respond without requiring @mentions.
  • Update the bot's logic to check if the incoming message's guild ID is listed in discord.free_response_guilds and skip the @mention requirement if it is.
  • Ensure the existing discord.free_response_channels, DMs, thread participation, ignored channels, and allowed channels behavior remains unchanged.
  • Test the new configuration with different guilds and channels to verify the expected behavior.

Example

discord:
  require_mention: true
  free_response_guilds:
    - "1476256146980606197"

Notes

This solution assumes that the bot has access to the guild ID of the incoming message and can check it against the configured discord.free_response_guilds list.

Recommendation

Apply the proposed solution by adding the discord.free_response_guilds configuration key and updating the bot's logic to support guild-level free-response exemptions. This approach provides a flexible and maintainable way to manage the bot's behavior across multiple guilds.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING