JnCrMx / discord-game-sdk4j

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

Setting ActivityType does nothing #37

Closed ghost closed 2 years ago

ghost commented 2 years ago

So I followed the ActivityExample.java and added activity.setType(ActivityType.LISTENING); or activity.setType(ActivityType.CUSTOM); and noticed the displaying prefix wasn't changing and kept saying "Playing XYZ Game". Is this a Bug, unimplemented feature or am I doing something incorrectly?

JnCrMx commented 2 years ago

The type field in Activity is ignored by Discord by design. There is sadly no way to change the prefix with the Discord Game SDK.

From the JavaDoc:

Only for event handling. Discord will ignore this field.

From Discord's documentation (https://discord.com/developers/docs/game-sdk/activities#data-models-activitytype-enum):

ActivityType is strictly for the purpose of handling events that you receive from Discord; though the SDK/our API will not reject a payload with an ActivityType sent, it will be discarded and will not change anything in the client.