JnCrMx / discord-game-sdk4j

Java bindings for Discord's Game SDK
MIT License
114 stars 23 forks source link

App not detected using Rich Presence #63

Closed frisby-ninja closed 1 year ago

frisby-ninja commented 1 year ago

Hello, everybody!

I'm trying to code a Minecraft Fabric mod, and am currently integrating a Discord Rich Presence functionality. However, when I run said mod and update the current activity, it's title is just 'RichTest'. I have looked for a few hours now, and cannot find any coverage on this kind of issue. I have also tried to manually set the title, but that is apparently impossible (if I just need to set the pointer, could someone please tell me how ; I'm new to this). There is nothing special in the logs.

Here is the Java class (within a zip folder): discord-rpc-class.zip

PS : The 'ActivityHolder' class is literally just a class that holds activity details and states. PPS : I've basically just copied and pasted the example activity setter class from this repo.

Any help would be appreciated, thanks! frisby_ninja

JnCrMx commented 1 year ago

Hi,

one of the issues with your code I am noticing is the ClientID you are setting. You are using 698611073133051974 as your client ID, which is an application called "RichTest" created by me for testing purposes. Therefore, the title (which you can only set for each application and sadly not via the SDK) is "RichTest".

In your case, you might want to create your own application, so you can set your own title, upload your own images, etc.

To do so, go here https://discord.com/developers/applications and click "New Application", give it a name and accept the ToS. Then copy the "Application ID" and use it with setClientID. Now you can freely change the name of your application (which will be shown as title) and also upload own Art Assets in the "Rich Presence" section.

I hope this helps! Jan

frisby-ninja commented 1 year ago

Thanks a lot! Sorry to bother you for something like that.