JnCrMx / discord-game-sdk4j

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

How to add buttons to an Activity? #64

Closed yoricya closed 1 year ago

yoricya commented 1 year ago

Help plz, how to add buttons to an Activity?

skyeredwood commented 1 year ago

Might not be possible with this library.

JnCrMx commented 1 year ago

Yes, unless you want just "Join" and "Spectate" buttons. The Game SDK offers very limited features when it comes to Rich Presence.

skyeredwood commented 1 year ago

I think it is still possible with the SDK, just hasn't been supported with the library yet. I've definitely seen custom buttons in some presences, and in some GameSDK libraries for other languages, e.g. NodeJS.

JnCrMx commented 1 year ago

If that is really the case, they are not documented in the official Game SDK documentation.

Make sure you do not confuse the now deprecated discord-rpc API with the Game SDK.

However, if there is some secret, undocumented functionality within the Game SDK allowing custom buttons, I could not be opposed to implementing them. If so, please provide some links to the libraries implementing them.

skyeredwood commented 1 year ago

I'm not sure where the documentation is either, but either way it is possible. You may be correct in saying that it's part of the deprecated API. Here's a library I found which supports it: https://github.com/qwertyquerty/pypresence

JnCrMx commented 1 year ago

Yes, according to its README the library you linked is using the deprecated RPC API.

This project only focuses on the Game SDK.