feat: add Discord bridge (host-side, Telegram-style) - #422
Conversation
- Add scripts/discord-bridge.js (host-side bridge using discord.js) - Update scripts/start-services.sh (service lifecycle integration) - Add docs/deployment/set-up-discord-bridge.md (setup guide) - Update docs/reference/commands.md (updated command docs) - Update bin/nemoclaw.js (credential forwarding in deploy flow) - Add discord.js dependency to package.json
Add scripts/discord-bridge.js following the same architecture as the Telegram bridge. Runs on the host because the sandbox proxy does not support CONNECT tunneling for WebSockets, which the Discord gateway requires (see NVIDIA#409). - Per-channel session continuity via channel-scoped session IDs - Message chunking at Discord's 2000-character limit - NEMOCLAW_MODEL and SANDBOX_NAME env var support - ALLOWED_GUILD_IDS for access control - !reset command to clear a channel session - Typing indicator while the agent runs Updates start-services.sh to start/stop the Discord bridge alongside the Telegram bridge when DISCORD_BOT_TOKEN is set. Adds docs/deployment/set-up-discord-bridge.md with setup instructions for creating a Discord application, inviting the bot, and configuring access control. Adds discord.js ^14.16.3 to package.json dependencies. Closes NVIDIA#422.
Add scripts/discord-bridge.js following the same architecture as the Telegram bridge. Runs on the host because the sandbox proxy does not support CONNECT tunneling for WebSockets, which the Discord gateway requires (see NVIDIA#409). - Per-channel session continuity via channel-scoped session IDs - Message chunking at Discord's 2000-character limit - NEMOCLAW_MODEL and SANDBOX_NAME env var support - ALLOWED_GUILD_IDS for access control - !reset command to clear a channel session - Typing indicator while the agent runs Updates start-services.sh to start/stop the Discord bridge alongside the Telegram bridge when DISCORD_BOT_TOKEN is set. Adds docs/deployment/set-up-discord-bridge.md with setup instructions for creating a Discord application, inviting the bot, and configuring access control. Adds discord.js ^14.16.3 to package.json dependencies. Closes NVIDIA#422.
|
Thanks for the Discord bridge implementation. The bridge-core pattern has continued to evolve since March (the Telegram bridge is established on main, Slack and Discord are still in progress). Could you rebase against main and check for overlap with other open Discord bridge work (#458)? Once it's current we can coordinate the review. Happy to discuss the right landing path. |
|
Thanks for this — a host-side Discord bridge is a frequently requested integration. We're doing an evaluation of the Discord bridge approach before committing to a merge path, as there's also a competing implementation in #458. We'll be reviewing both PRs together to decide on direction. We'll follow up here once we have a clearer picture. No action needed on your end for now — we'll reach out if we need more information. |
|
Thanks for contributing this. Discord support has since landed via a different approach — the host-side bridge script architecture was replaced with OpenShell-managed channels and a Closing as superseded by the new messaging channel architecture. Feel free to reopen if you see gaps in the current Discord support. |
Description
This PR implements a host-side Discord bridge for NemoClaw, following the same architecture as the existing Telegram bridge.
As discussed in #213 and upstream issue #409, a host-side bridge is currently required because the sandbox proxy does not support CONNECT tunneling and local DNS resolution for WebSockets (
gateway.discord.gg), preventing the native Discord plugin from running inside the sandbox.Proposed Changes
scripts/discord-bridge.jsusingdiscord.jsscripts/start-services.shandbin/nemoclaw.js--session-id(e.g.dc-ch-${channelId})docs/deployment/set-up-discord-bridge.mdNotes
Closes #213