feat(talon): add Discord channel adapter - #5992
Open
Mike Merrill (linted) wants to merge 3 commits into
Open
Conversation
Adds a Discord channel using the discord.py Gateway client, mirroring the Telegram adapter's shape: text/media send and receive, typing, edit, reactions, and exposure/allowlist gating. Outbound text over Discord's 2000-character limit is split into multiple messages sent in order.
Mike Merrill (linted)
requested a review
from John Kennedy (jkennedyvz)
as a code owner
August 30, 2026 01:14
Contributor
|
ℹ️ Project README edits acknowledged via the
Remove the label to re-enable the block. |
5 tasks
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
… 3.12 discord.py's voice-playback module unconditionally imports the deprecated stdlib audioop module even though talon never uses Discord voice features, which fails CI under this package's warnings-as-errors pytest config.
Discord's Gateway redelivers the bot's own outbound messages through on_message; the from_self metadata flag was treated as an admitted sender (a case meant for Telegram/WhatsApp operator-device messages), so every reply looped back into a new agent invocation. Drop self-authored messages before exposure checks in every mode. Also fix a startup race in the gateway connect wait: on the normal success path the readiness task wins FIRST_COMPLETED, leaving the actual gateway task in `pending` -- which then got cancelled right after marking the adapter connected, killing the receive loop.
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.
Summary
deepagents_talon(talon), built ondiscord.py's Gateway client, following the same architectural pattern as the existing Telegram/WhatsApp adapters.--discordinto the CLI/host factory and documents setup (including the required Message Content privileged intent) inlibs/talon/README.md.Test plan
uv run --group test pytest(fulllibs/talonsuite, includes newtests/channels/test_discord.py)uv run --group test ruff check .uv run --group test ty check(clean aside from 2 pre-existing unrelated errors intests/test_observability.py, confirmed present onmainindependent of this change)