Skip to content

feat: use Listening activity type for Discord presence#76

Merged
twangodev merged 1 commit into
mainfrom
feat/listening-activity-type
May 24, 2026
Merged

feat: use Listening activity type for Discord presence#76
twangodev merged 1 commit into
mainfrom
feat/listening-activity-type

Conversation

@twangodev
Copy link
Copy Markdown
Owner

@twangodev twangodev commented May 24, 2026

Set RPC activity type 2 so presence renders "Listening to …" instead of "Playing" — Discord lifted the whitelist restriction on this type. go-discordrpc exposes no enum, so a local activityTypeListening constant is defined.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed Discord presence display to correctly show "Listening to" activity type.

Review Change Stack

Discord removed the whitelist restriction on the "Listening" RPC
activity type, so set type 2 on the presence to render "Listening
to ..." instead of "Playing". go-discordrpc exposes no enum for
this, so define a local activityTypeListening constant.
Copilot AI review requested due to automatic review settings May 24, 2026 20:17
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 24, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a3a0a740-d3c3-48b9-a88e-3a2ee6e6f6f7

📥 Commits

Reviewing files that changed from the base of the PR and between 0e0845f and 2a58cea.

📒 Files selected for processing (1)
  • activity.go

📝 Walkthrough

Walkthrough

This PR adds an explicit activityTypeListening constant to map Discord's listening activity type and applies it when creating the activity, ensuring the presence is consistently marked as "Listening to …".

Changes

Discord Listening Activity Type

Layer / File(s) Summary
Listening activity type definition and usage
activity.go
Defines activityTypeListening constant mapped to go-discordrpc listening presence value and applies it when building the returned Discord activity.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A listening ear in Discord's hall,
One constant defined, one call,
No more defaults floating free,
Presence is clear as can be! 🎵

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: use Listening activity type for Discord presence' accurately and concisely describes the main change: implementing a Listening activity type for Discord RPC presence instead of the default Playing type.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/listening-activity-type

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Discord Rich Presence payload so scrobbles appear as “Listening to …” instead of “Playing” by setting the activity Type to 2 (Listening), using a local constant because go-discordrpc doesn’t expose an enum.

Changes:

  • Add a local activityTypeListening = 2 constant with explanatory comments.
  • Set Type on the client.Activity returned by createActivity so Discord renders the “Listening to …” presence label.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@twangodev twangodev merged commit 2918584 into main May 24, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants