ungive / discord-music-presence

Rich presence for sharing your music listening activity in your Discord status. Works with any media player on your system. For Windows and Mac (and soon Linux).
https://musicpresence.app
Other
40 stars 0 forks source link

Allow changing "Music" in rich presence to custom text with variables #11

Closed poetryofcode closed 1 month ago

poetryofcode commented 1 month ago

Is there an existing issue for this?

Describe the problem

It would be great to have a feature that would allow users to change Music displayed in rich presence under the user-/nickname to something else.

Solution

Preferably custom text with freely-usable variables like %artist% and %song%.

Alternatives

Playing...

Additional context

No response

ungive commented 1 month ago

First of all, thank you for being my first-ever GitHub sponsor! I'm happy you like my work.

TL;DR It's not possible with Discord Rich Presence, you can only have a static name, read below for more info.

Regarding your suggestion: Discord Rich Presence works by supplying the ID of a registered Discord Application that was created in the Developer Portal. When you're using Music Presence the ID for the Discord Application I created is sent to Discord and the name of that application is shown in your status. That's why it says "Playing a game" there. "Music" is the name of that application and it's unfortunately completely static, you can't change it dynamically with Discord Rich Presence, as far as I know.

Bots are able to change it at their will, but then you would have to "self-bot", which is against Discord's ToS and I'm opposed towards implementing anything that can get users of Music Presence banned from Discord.

Discord's Rich Presence also ignores the type of activity in the presence. There are game activities like "Playing ...", but also activity types for things like listening "Listening to ...", which I have tried to use before, but it doesn't work and always shows "Playing". It would be awesome if it would say "Listening to Music", "Playing Music" is just a workaround that luckily reads nice, but we're out of luck with that (at least for now).

The only option you have is registering your own Discord Application here, giving it a static name of your choosing and using its Application ID.

You change the application ID in the configuration file of Music Presence, which is located in %APPDATA%\Roaming\Music Presence\settings.json. Just replace the large number with your application ID (the " around it are necessary). Make sure Music Presence is closed while you do that because settings are saved on exit, which would overwrite your change.

Hope that helps!

poetryofcode commented 1 month ago

Hey, it crossed my mind that it might be tied to a registered application, but I wasn't sure if this is the case with Discord, having not developed anything for it myself.

Thankfully, this is not a feature I urgently need, more into the category of "nice to haves".

The workaround with the app ID is quite neat, I shall try that in the near future.

Thanks for the detailed explanation, really appreciate it :)!