discord / discord-rpc

https://discordapp.com/developers
MIT License
1.04k stars 322 forks source link

[Feature Request] Dynamically set Application name ("Playing ...") #375

Open VelocityRa opened 1 year ago

VelocityRa commented 1 year ago

Rich Presence does not support dynamically setting a custom App Name (as in "Now Playing ..."). It instead takes the App Name from the Application Name from under https://discordapp.com/developers.

The vast majority of people don't click on profiles to see rich presence details, this would be very useful for music/movies etc app rich presence support. It's the difference between 99% of people seeing ie. "Playing <song title/artist>" instead of "Playing Music" or such.

It's a feature that even MSN messenger supported.


This Issue is a continuation of #54 that got inexplicably closed.

a-github-account commented 1 year ago

image

At the very least, users should be able to change the name ("Last.fm" here) dynamically.

rollingmoai commented 1 year ago

The AliucordRN RichPresence plugin has the ability to do this: image image

@amsyarasyiq any tips on how we can do this?

Lachee commented 1 year ago

Can you actually edit the application name while running tho? Is it doing it via the RPC or is it using a API call to the developer portal? Also note custom clients, being outside of the TOS, dont always follow the rules when it comes to implementing features

edit: After quick testing I can confirm they must be doing something that normal RPC clients don't have access to (assuming they do allow you to change the name during runtime) as trying to send the activities they do result in RPC errors: error

RyloRiz commented 1 year ago

Can you actually edit the application name while running tho

It should be possible from what I know of the Discord RPC API. There is a field for name in the Activity Structure.

I would 100% support this being added. I have numerous use cases for this and it seems logical given that most people tend to only glance at quick status, which only displays the activity name. I do this myself and it is annoying that you need a different client ID for every different custom app, since Discord limits the amount of applications you can have.

rollingmoai commented 1 year ago

Another reference: Vencord CustomRPC plugin

amsyarasyiq commented 1 year ago

No, it is not possible from a real application. The only reason why modified Discord clients could is because it manually set the application name, bypassing the default behavior (which is fetching the application name from the ID).

J0nathan550 commented 9 months ago

Another reference: Vencord CustomRPC plugin

It is possible because you expose your discord token :(

J0nathan550 commented 9 months ago

Another reference: Vencord CustomRPC plugin

It's like with Spotify, you can create account there and link discord, when you link discord, you expose your discord token, so that they can detect activity.

Lachee commented 9 months ago

Rich Presence doesn't expose your token to anyone.

J0nathan550 commented 9 months ago

Rich Presence doesn't expose your token to anyone.

Then how people is able to change the status to Listening to or Watching when it's not the part of RPC?

WaGi-Coding commented 1 month ago

any news on that?

J0nathan550 commented 1 month ago

any news on that?

In order to actually change statuses to those, you need to extract actual user token. And use something else than this library. For example discord bots allow that feature because we literally parse the token of bot (like a user). And then using API calling specific code to change status to whatever you like. So in here, in this library, there will be no ability to add this feature unless to add the authentication, extracting user token and etc. To allow such functionality. This library is perfect for making "Game" activity.