From 2a58cea19ca1908e53c50c5a88f5a306cea5ff49 Mon Sep 17 00:00:00 2001 From: James Ding Date: Sun, 24 May 2026 13:16:02 -0700 Subject: [PATCH] feat: use Listening activity type for Discord presence 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. --- activity.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/activity.go b/activity.go index c9fd07d..26f274e 100644 --- a/activity.go +++ b/activity.go @@ -7,6 +7,10 @@ import ( "golang.org/x/net/html" ) +// Discord activity type for "Listening to ..." presence. +// go-discordrpc encodes this as 0=Playing, 1=Streaming, 2=Listening, 3=Watching. +const activityTypeListening = 2 + func createActivity(s lfm.Scrobble, songLink bool) client.Activity { var songButton *client.Button @@ -52,6 +56,7 @@ func createActivity(s lfm.Scrobble, songLink bool) client.Activity { } return client.Activity{ + Type: activityTypeListening, Details: s.Name, State: fmt.Sprintf("by %v", s.Artist), LargeImage: coverUrl,