[PR #8592] feat: discord rich presence integration #12800

Closed
opened 2026-02-16 18:17:41 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/8592

State: closed
Merged: No


Closes #8593

Summary

  • Add Discord Rich Presence support to show current session info in Discord
  • Includes default OpenCode app ID so users don't need to set up their own Discord app
  • Configurable options for model, tool, session duration, and share button display

Related: Supersedes stale PR #418 which was incomplete (missing default client ID, share link issues).

Changes

  • packages/opencode/src/discord/presence.ts - Core Discord RPC implementation
  • packages/opencode/src/config/config.ts - Add discord config schema
  • packages/opencode/src/project/bootstrap.ts - Initialize Discord presence on startup
  • packages/opencode/test/discord/rich-presence.test.ts - Unit tests
  • packages/web/src/content/docs/config.mdx - Documentation

Config

{
  "discord": {
    "enabled": true,
    "showSessionDuration": true,
    "showModel": true,
    "showTool": true,
    "buttons": { "session": true }
  }
}

Enabled by default with default client ID. Set enabled: false to disable.

Verification

  • Unit tests pass locally (bun test packages/opencode/test/discord/rich-presence.test.ts)
  • CI checks passing
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/8592 **State:** closed **Merged:** No --- Closes #8593 ## Summary - Add Discord Rich Presence support to show current session info in Discord - Includes default OpenCode app ID so users don't need to set up their own Discord app - Configurable options for model, tool, session duration, and share button display > **Related:** Supersedes stale PR #418 which was incomplete (missing default client ID, share link issues). ## Changes - `packages/opencode/src/discord/presence.ts` - Core Discord RPC implementation - `packages/opencode/src/config/config.ts` - Add `discord` config schema - `packages/opencode/src/project/bootstrap.ts` - Initialize Discord presence on startup - `packages/opencode/test/discord/rich-presence.test.ts` - Unit tests - `packages/web/src/content/docs/config.mdx` - Documentation ## Config ```json { "discord": { "enabled": true, "showSessionDuration": true, "showModel": true, "showTool": true, "buttons": { "session": true } } } ``` Enabled by default with default client ID. Set `enabled: false` to disable. ## Verification - Unit tests pass locally (bun test packages/opencode/test/discord/rich-presence.test.ts) - CI checks passing
yindo added the pull-request label 2026-02-16 18:17:41 -05:00
yindo closed this issue 2026-02-16 18:17:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12800